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

Constrain is-fullscreen-mode admin body class to posts list #63166

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

ntsekouras
Copy link
Contributor

What?

Fixes a bug introduced here: #62705

This PR constrains the is-fullscreen-mode admin body class to posts list.

@ntsekouras ntsekouras added the [Type] Bug An existing feature does not function as intended label Jul 5, 2024
@ntsekouras ntsekouras self-assigned this Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: nerrad <nerrad@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link

github-actions bot commented Jul 5, 2024

Flaky tests detected in ee2a4e3.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9804072570
📝 Reported issues:

Copy link
Contributor

@nerrad nerrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code wise looks okay (with the caveat in my comment). I haven't tested so I'm assuming you've confirmed this still addresses the original reason the code was added.

return "$classes is-fullscreen-mode";
}
);
if ( isset( $_GET['page'] ) && 'gutenberg-posts-dashboard' === $_GET['page'] ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What confidence level is there that this route name will remain the same if/when this is ported to WordPress (given the gutenberg namespace used here). Should page references like this be returned from some sort of central map so that the name can be changed in one place when ported?

For example:

const PAGE_ROUTE_MAP = {
     POSTS_DASHBOARD: 'gutenberg-posts-dashboard',
     /** ...mapping for other known routes... **/
};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the v1 of posts lists that a GB experiment and we don't know when it's going to be added in core and will have many updates over time. Eventually it will have a specific admin page, where we won't have to do the redirection and these param checks, similar to the site editor page.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks for the fix!

@ntsekouras ntsekouras merged commit 885dd36 into trunk Jul 5, 2024
70 checks passed
@ntsekouras ntsekouras deleted the constraint-fullscreenmode-class-in-posts-list branch July 5, 2024 11:22
@github-actions github-actions bot added this to the Gutenberg 18.8 milestone Jul 5, 2024
@andrewserong andrewserong added the [Feature] Posts/Tags/Categories Screen Bringing Data Views to Posts, Categories and Tags alongside their own Forms/Editors. label Jul 9, 2024
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Jul 18, 2024
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: nerrad <nerrad@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Posts/Tags/Categories Screen Bringing Data Views to Posts, Categories and Tags alongside their own Forms/Editors. [Type] Bug An existing feature does not function as intended
3 participants