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

Fix the snackbar notices position #18683

Merged
merged 1 commit into from Nov 22, 2019
Merged

Fix the snackbar notices position #18683

merged 1 commit into from Nov 22, 2019

Conversation

@youknowriad
Copy link
Contributor

youknowriad commented Nov 22, 2019

This PR fixes another small regression caused by #18044 where the snackbar notices were positioned at the top instead of the bottom left of the page.

Basically the edit-post-layout__content className has been removed. Fortunately, this is the only place it was used. I'm also removing some useless styles I found.

I'm also adding a "Needs dev note" label to document this change in the next WordPress release.

@youknowriad youknowriad requested a review from talldan as a code owner Nov 22, 2019
@youknowriad youknowriad self-assigned this Nov 22, 2019
@youknowriad youknowriad requested a review from WordPress/gutenberg-core Nov 22, 2019
}

// Pad the scroll box so content on the bottom can be scrolled up.
padding-bottom: 50vh;

This comment has been minimized.

Copy link
@ellatrix

ellatrix Nov 22, 2019

Member

Why is this removed?

This comment has been minimized.

Copy link
@ellatrix

ellatrix Nov 22, 2019

Member

I believe this part in necessary for the typewriter experience.

This comment has been minimized.

Copy link
@youknowriad

youknowriad Nov 22, 2019

Author Contributor

I guess we should restore it then, but it's not clear how it's related since it's very detached from the typewriter experience. Maybe it should be added in JS or in the typewriter component.

Also it's a separate regression from this PR I think.

This comment has been minimized.

Copy link
@ellatrix

ellatrix Nov 22, 2019

Member

It's not strictly needed for the typewriter experience. It just makes it nicer. It's styling and it can be adjusted. The comment says what it is: extra space on the bottom of the page so it can be scrolled up more. I'm not sure what's a better place for it.

This comment has been minimized.

Copy link
@youknowriad

youknowriad Nov 22, 2019

Author Contributor

Maybe still this file then by overriding the editor regions style, EditorRegions is meant to be something generic that will be used outside the editor (widgets, ... any page that has the same global layout than the editor) so I don't think it makes sense there.

This comment has been minimized.

Copy link
@youknowriad

youknowriad Nov 22, 2019

Author Contributor

@ellatrix would you min adding the fix to this PR or a separate one. I'm personally not sure what impact this have and to be honest, the type writer experience feels good even without it for me.

This comment has been minimized.

Copy link
@gwwar

gwwar Nov 22, 2019

Contributor

I don't really see any difference with these rules added/removed, but I'm also not sure when this class is added. Querying the DOM in the post editor returns 0 nodes for me. Overall reading this, removal of these rules feel unrelated to the fix here. Is this blocking @ellatrix ?

This comment has been minimized.

Copy link
@youknowriad

youknowriad Nov 22, 2019

Author Contributor

These rules don't do anything at the moment because that class don't exist in the DOM. i think the fix should be done separately as this is just dead code for now. And the fix is not to bring the whole style back but just the padding bottom if I understand properly.

@gwwar
gwwar approved these changes Nov 22, 2019
Copy link
Contributor

gwwar left a comment

Thanks @youknowriad I verified that this fixes the snackbar position. Maybe let's drop changes to edit-post-layout__scrollable-container since I didn't see how this was related in testing. If it's not actually needed, lets split that out to another janitorial.

Screen Shot 2019-11-22 at 10 23 45 AM

@youknowriad youknowriad merged commit a8b6578 into master Nov 22, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@youknowriad youknowriad deleted the fix/notices-position branch Nov 22, 2019
@youknowriad youknowriad added this to the Gutenberg 7.0 milestone Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.