Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Beta task checklist #57

Open
9 of 11 tasks
dreamwhisper opened this issue Feb 14, 2023 · 17 comments
Open
9 of 11 tasks

Beta task checklist #57

dreamwhisper opened this issue Feb 14, 2023 · 17 comments

Comments

@dreamwhisper
Copy link
Contributor

dreamwhisper commented Feb 14, 2023

Feel free to edit as needed. We could also create a project if we feel it is needed.

@kienstra
Copy link
Contributor

Working on:

Renaming a pattern creates a new copy.

@kienstra
Copy link
Contributor

Also working on:

Delete all pm_pattern posts (these are not needed as we pull from files)

@kienstra
Copy link
Contributor

Could you expand on this?

Make sure content isn't stale when using back button.

@kienstra
Copy link
Contributor

Also working on:

Send a notice through the heartbeat API to any patterns still open that says The theme was changed. This pattern does not exist in this theme. Please close this tab.

@kienstra
Copy link
Contributor

Hi @dreamwhisper,
Could you expand on this, please?

Make sure content isn't stale when using back button.

(If that was your idea)

@dreamwhisper
Copy link
Contributor Author

dreamwhisper commented Feb 23, 2023

@kienstra Might need @johnstonphilip to expand on that one. I think it's that the previews aren't up to date with what should be showing.

@kienstra
Copy link
Contributor

Ah, that makes sense! Thanks!

@kienstra
Copy link
Contributor

If it would help, I could demo this in Sprint Review:

@johnstonphilip
Copy link
Contributor

Alignments should be fixed with WordPress/gutenberg#48380

@kienstra
Copy link
Contributor

kienstra commented Mar 6, 2023

Hi @dreamwhisper,
Is this working now?

Ensure assets save appropriately.

Hope you had a great weekend.

@kienstra
Copy link
Contributor

kienstra commented Mar 6, 2023

Hi @johnstonphilip,
Do you know about this, and whether it's still an issue?

Make sure content isn't stale when using back button.

Hope your week's off to a great start.

@johnstonphilip
Copy link
Contributor

@kienstra Yeah I think this is still happeneing (on my tests it is). To replicate:

  1. Create a new pattern.
  2. After saving it, click back
  3. Notice that new pattern doesn't show in the list of available patterns

This is because the browser shows a cached version of the HTML, and since our app's initial state is populated from that, it isn't up to date.

To fix this, I think we'd have to fetch the data from an API upon first render. Unless there's some way of forcing a browser to load fresh, even on a back click.

@johnstonphilip
Copy link
Contributor

@kienstra
Copy link
Contributor

kienstra commented Mar 6, 2023

Oh thanks, I see that also. Interesting idea about to 'fetch the data from an API upon first render,' and good find of that StackOverflow question.

@kienstra
Copy link
Contributor

kienstra commented Mar 6, 2023

Hi @johnstonphilip,

This is because the browser shows a cached version of the HTML, and since our app's initial state is populated from that, it isn't up to date.

Maybe this is crazy, but what do you think about ignoring this bug?

The same issue exists when creating a new post of type 'post'. Maybe you knew about this already, I just learned about it:

  1. Go to /wp-admin/edit.php
  2. Click 'Add New':

Screenshot 2023-03-06 at 12 52 37 PM

  1. Add a title like 'New Post':

Screenshot 2023-03-06 at 12 59 53 PM

  1. Publish
  2. Use the browser back button
  3. Expected: 'New Post' is in the post list:

Screenshot 2023-03-06 at 12 53 50 PM

  1. Actual: It's not in the list

It's how the browser works, though it's definitely a bad UX 😄

To fix this, I think we'd have to fetch the data from an API upon first render.

Good idea, this would be pretty easy to implement.

But it'd be a lot of boilerplate code, like registering a get-patterns endpoint, and adding another useEffect() to load the patterns.

@johnstonphilip
Copy link
Contributor

johnstonphilip commented Mar 6, 2023

Yeah. An alternative might be if we can provide some way of getting back to the patterns view without clicking "back", that would be enough. I suppose the admin sidebar Patterns button does that, though it's likely not showing for most people who have the block editor open in full-screen mode. We could leave this and wait for beta feedback too.

@kienstra
Copy link
Contributor

kienstra commented Mar 6, 2023

Ah, like this 'back' button?

Screenshot 2023-03-06 at 1 27 21 PM

On clicking it, the newly created pattern shows.

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

No branches or pull requests

3 participants