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 content lost when switching list type #32405

Closed
draganescu opened this issue Jun 2, 2021 · 7 comments · Fixed by #32432
Closed

List content lost when switching list type #32405

draganescu opened this issue Jun 2, 2021 · 7 comments · Fixed by #32432
Assignees
Labels
[Block] List Affects the List Block [Priority] High Used to indicate top priority items that need quick attention [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Milestone

Comments

@draganescu
Copy link
Contributor

Description

List content lost when switching list type.

Step-by-step reproduction instructions

In any block editor:

  1. add a list block
  2. add some list items
  3. from the block toolbar convert from unorererd to ordered
  4. list content is lost

Expected behaviour

List content to not be lost

Actual behaviour

List content is lost

Screenshots or screen recording (optional)

list-content-lost.mp4

WordPress information

  • WordPress version: 5.7.2
  • Gutenberg version: Trunk
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Device: Desktop
  • Operating system: OSX
  • Browser: Safari
@draganescu draganescu added [Type] Bug An existing feature does not function as intended [Block] List Affects the List Block labels Jun 2, 2021
@draganescu draganescu added this to the WordPress 5.x milestone Jun 2, 2021
@paaljoachim
Copy link
Contributor

I just tested with WP 5.8 and switching between list types removes the list content.

@youknowriad youknowriad added this to 📥 To do in WordPress 5.8 Must Haves via automation Jun 2, 2021
@youknowriad youknowriad added the [Priority] High Used to indicate top priority items that need quick attention label Jun 2, 2021
@torounit
Copy link
Member

torounit commented Jun 3, 2021

2021-06-03.13.56.21.mov

Values are saved. Indenting will apply the changes.

Gutenberg version: Trunk

@torounit
Copy link
Member

torounit commented Jun 3, 2021

The new value is passed to <RichText>, but it is not displayed correctly.

@torounit
Copy link
Member

torounit commented Jun 3, 2021

useRefEffect( () => {
applyFromProps();
didMount.current = true;
}, [ placeholder, ...__unstableDependencies ] ),

If the applyFromProps on this line is executed, the edited text will be returned.

@torounit
Copy link
Member

torounit commented Jun 3, 2021

If you comment out this line, it will be displayed correctly.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 3, 2021
@ellatrix
Copy link
Member

ellatrix commented Jun 3, 2021

I see this is also happening with the heading block. We have a test that was supposed to guard against problems with placing the node type, but it didn't test adding content:

it( 'should handle change in tag name gracefully', async () => {
.

@torounit
Copy link
Member

torounit commented Jun 4, 2021

@ellatrix Happening with the heading block too.

2021-06-04.12.57.32.mov

@youknowriad youknowriad moved this from 📥 To do to 🏗️ In progress in WordPress 5.8 Must Haves Jun 4, 2021
WordPress 5.8 Must Haves automation moved this from 🏗️ In progress to ✅ Done Jun 7, 2021
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 [Priority] High Used to indicate top priority items that need quick attention [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants