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

Columns broken in 5.4 #5

Closed
nickhamze opened this issue Mar 18, 2020 · 9 comments
Closed

Columns broken in 5.4 #5

nickhamze opened this issue Mar 18, 2020 · 9 comments
Assignees

Comments

@nickhamze
Copy link
Member

nickhamze commented Mar 18, 2020

Something changed and the columns look fine on the backend but not on the frontend. The classes aren't present at all on the frontend.

@nickhamze nickhamze assigned nickhamze and Mamaduka and unassigned nickhamze Mar 18, 2020
@Mamaduka
Copy link
Contributor

Mamaduka commented Mar 23, 2020

@nickhamze I can reproduce this issue in WP 5.3.2 as well.

P.S. Can you point me a WP version where columns work, so I can see what changed in core block?

@nickhamze
Copy link
Member Author

@Mamaduka

Weird I'm using it here and the columns work fine:
https://hellofromseattle.com/apps/

But when I try to create a page on the the same site it doesn't work.

I think it means that it broke from 1.0.0 to 1.0.1 as that first list was created with 1.0.0.

Maybe this commit broke it:
65c8fb3

@Mamaduka
Copy link
Contributor

You're right.

The following condition will always be true for core/list block and return props without modifications.

if ( typeof props.className === 'undefined' || ! props.className ) {
	return props;
}

Unfortunately, my solution also triggers block validation error as mentioned in the #1 issue. I'm not able to find anything in Gutenberg repo that might help us solve the block validation issue.

@nickhamze
Copy link
Member Author

nickhamze commented Mar 26, 2020

@Mamaduka What if we created a column style? Would that let us add classes without triggering validation errors?

@Mamaduka
Copy link
Contributor

@nickhamze core/list block doesn't support generated class names, so I don't think styles will work with it.

Keeping an eye on this issue and hopefully some better option will be part of the core.

Currently, we have to provide this bad experience for the users.

@nickhamze
Copy link
Member Author

@Mamaduka could we add the classes here somehow. We did that with guidepost in the beginning.

Screen Shot 2020-03-26 at 10 36 03 AM

Mamaduka added a commit that referenced this issue Mar 27, 2020
@Mamaduka
Copy link
Contributor

@nickhamze pushed the fix, can you test again and also confirm that issue from #1 doesn't happen as well?

@nickhamze
Copy link
Member Author

@Mamaduka yeah works well. I screwed up and did the 1.0.1 manually so the repo still says we're on 1.0.0 don't forget to bump it to 1.0.2 before pushing the new version.

@Mamaduka
Copy link
Contributor

Changes are deployed to WP.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants