Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Margin control for blocks not appearing when using Neve #4282

Open
rodica-andronache opened this issue Aug 1, 2024 · 12 comments
Open

Margin control for blocks not appearing when using Neve #4282

rodica-andronache opened this issue Aug 1, 2024 · 12 comments
Labels
bug This label could be used to identify issues that are caused by a defect in the product. on-hold Not being actively worked by being blocked or not having the capacity to work on it.

Comments

@rodica-andronache
Copy link
Contributor

rodica-andronache commented Aug 1, 2024

Description

There is no way to add/edit margin for any block, when using Neve. This worked at some point, from what I remember, but even though I've tried it with a couple of versions of Neve, it still didn't worked

Step-by-step reproduction instructions

  1. On a fresh instance with just Neve
  2. Add any new block
  3. Go to Style > Dimensions
  4. Only the Padding control is available. Margin is missing

Screenshots, screen recording, code snippet or Help Scout ticket

How it works with any other theme

Annotation on 2024-08-01 at 11-19-54

How it works with Neve ( Margin is missing )

Annotation on 2024-08-01 at 11-21-27

https://fadebreath.s3-tastewp.com/wp-admin/
user: rodica
pass: rodica

Environment info

No response

Is the issue you are reporting a regression

No

@rodica-andronache rodica-andronache added the bug This label could be used to identify issues that are caused by a defect in the product. label Aug 1, 2024
@selul
Copy link
Contributor

selul commented Aug 6, 2024

@vytisbulkevicius I see we added this here #4110, any reason why is no longer present? could be something related to 6.6?

@vytisbulkevicius
Copy link
Contributor

The issue was introduced with 3.8.0 version of the theme - https://github.com/Codeinwp/neve/releases/tag/v3.8.0
With 3.7.5 it still works

@vytisbulkevicius vytisbulkevicius added the Priority-Medium Expected resolution time - up to 1 month. label Aug 6, 2024
@girishpanchal30
Copy link
Contributor

Hey @vytisbulkevicius @selul,

I've tested with 3.7.4 and it seems not working either.

We need to add theme.json to control the dimensions settings.

e.g:

{
	"version": 2,
	"settings": {
		"spacing": {
			"margin": true,
			"padding": true
		}
	}
}

But I've checked previous some tickets regarding the remove theme.json file.

#3485

#3694

neve/readme.md

Line 572 in 511d347

- [Fix] Remove the theme.json file as it adds lots of other issues

Should I add a theme.json file, please let me know. After adding the theme.json file it will show the margin option as well.
Ref: https://tinyurl.com/277cbxxv

Thanks

@vytisbulkevicius
Copy link
Contributor

Sorry, I confused you with the version here Girish is right. When I activated 3.7.5 I think it threw an error on the website and it didn't get activated which I didn't notice so another theme remained active that's why I was seeing the "margin".

@girishpanchal30
Copy link
Contributor

@vytisbulkevicius Okay np, Please let me know your thoughts about the theme.json file.

@selul
Copy link
Contributor

selul commented Aug 8, 2024

@vytisbulkevicius did we reverted the changes here at some time? #4110

@vytisbulkevicius
Copy link
Contributor

I don't think so, if we check what was added by this PR - https://github.com/Codeinwp/neve/pull/4145/files

All those are still present https://github.com/Codeinwp/neve/blob/master/inc/core/front_end.php#L48

Also, if we reverted somewhere later, it means with that version where it was released - 3.7.4 it should be working but it's not :/

@selul
Copy link
Contributor

selul commented Aug 8, 2024

@girishpanchal30 maybe you can check how that issue was implemented to fix this.

@girishpanchal30
Copy link
Contributor

@selul If theme.json is causing issues, we can enable the margin setting using the following filter.

add_filter(
	'wp_theme_json_data_theme',
	function ( $json ) {
		$data = $json->get_data();
		// Add margin in theme.json.
		$data['settings']['spacing']['margin'] = true;
		$json->update_with( $data );
		return $json;
	}
);

Please let me know if that is fine then I'll add it to the neve theme default.

Thanks

@selul
Copy link
Contributor

selul commented Aug 8, 2024

@girishpanchal30 can we use the same method implemented in the referenced issue?

@girishpanchal30
Copy link
Contributor

The add_theme_support('custom-spacing'); feature is already included in the Neve theme, but it only enables the padding option.
Ref: https://github.com/search?q=repo%3ACodeinwp%2Fneve%20add_theme_support(%20%27custom-spacing%27%20)&type=code

@selul
Copy link
Contributor

selul commented Aug 8, 2024

I think in this case we need to be careful with adding that as it might break some starter sites if it adds some default values based on what I see on other issues.

I suggest we put this on hold and close it until we have time to dig deeper.

@vytisbulkevicius vytisbulkevicius added on-hold Not being actively worked by being blocked or not having the capacity to work on it. and removed Priority-Medium Expected resolution time - up to 1 month. labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. on-hold Not being actively worked by being blocked or not having the capacity to work on it.
Projects
None yet
Development

No branches or pull requests

4 participants