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

List v2: add __experimentalEnableListBlockV2 flag for mobile #42697

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Jul 26, 2022

What?

Adds a flag for mobile to know if the site supports List v2.
See #40089, but for List v2 this time.
See #42624 for request.

Why?

Mobile needs to know when to load the v1 and the v2 of the list block.

How?

By adding a __experimentalEnableQuoteBlockV2 flag to the block editor settings endpoint.

Testing Instructions

  • Comment lines 22 and 23 here so the code runs for any request, and not only for a 'mobile' request.
  • Go to "Gutenberg > Experiments" and enable the list v2 experiment.
  • Load the post editor, open the devtools, and execute wp.apiFetch({path: '/wp-block-editor/v1/settings/', method: 'GET'}). The expected result is that the flag __experimentalEnableListBlockV2 is present and is true.
  • Go to "Gutenberg > Experiments" and disable the list v2 experiment.
  • Load the post editor, open the devtools, and execute wp.apiFetch({path: '/wp-block-editor/v1/settings/', method: 'GET'}). The expected result is that the flag __experimentalEnableListBlockV2 is present and is false.

Screenshots or screencast

@ellatrix ellatrix added Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Block] List Affects the List Block labels Jul 26, 2022
@ellatrix ellatrix requested a review from fluiddot July 26, 2022 11:05
@ellatrix ellatrix mentioned this pull request Jul 26, 2022
12 tasks
Copy link
Member

@geriux geriux left a comment

Choose a reason for hiding this comment

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

LGTM! I've tested this and it's returning the flag correctly. Thank you for adding this 🎉

@geriux geriux mentioned this pull request Jul 26, 2022
2 tasks
@ellatrix ellatrix merged commit bb9d9ce into trunk Jul 26, 2022
@ellatrix ellatrix deleted the add/list-v2-mobile-endpoint branch July 26, 2022 16:46
@github-actions github-actions bot added this to the Gutenberg 13.8 milestone Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants