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

chore: migrate colors to generic ones [closes #19] #21

Closed
wants to merge 10 commits into from

Conversation

abaicus
Copy link
Contributor

@abaicus abaicus commented Dec 8, 2022

Edit from Hardeep:

Testing: Make sure all the color variables are migrated after the activating the zip from this build and the theme looks the same before/after the zip file.

@abaicus abaicus marked this pull request as ready for review December 8, 2022 15:07
@github-actions
Copy link

github-actions bot commented Dec 8, 2022

Plugin build for 89d46d4 is ready 🛎️!

@HardeepAsrani
Copy link
Member

@Codeinwp/design-team Here, can you help us to make sure this works as intended or any changes are required? Thank you!

@mghenciu
Copy link
Contributor

mghenciu commented Jun 7, 2023

https://github.com/orgs/Codeinwp/teams/design-team Here, can you help us to make sure this works as intended or any changes are required? Thank you!

The build file from above is not available for download, in order to do the testing. Probably it expired.
And if I am not mistaking, this is more a dev chore - so nothing should be wrong/changed in terms of the UIX.

@HardeepAsrani HardeepAsrani linked an issue Jul 3, 2023 that may be closed by this pull request
@irinelenache
Copy link
Contributor

@HardeepAsrani
Copy link
Member

@irinelenache Yes, that does happen at first but you can refresh the page and it should start to work like previously. Let me know how it goes for you.

@irinelenache
Copy link
Contributor

@HardeepAsrani After a few refreshes the frontend looked fine 👍 In the editor though, the colors are still changed, i tried to clear the cache, use incognito and Browserstack.

You can check on this instance:

 Admin area URL: https://feignedexpert.s3-tastewp.com/wp-admin 
 Username: irinel 
 Password: 13aA8GzHtC4 

Let me know if there's any problem on my end 🙏

@HardeepAsrani
Copy link
Member

Thanks @irinelenache, seems to be an issue.

Before we start working on it @abaicus, just wanted to know if this was a known side effect of this or there was work needed to fix this behavior, if you're aware?

@abaicus
Copy link
Contributor Author

abaicus commented Jul 6, 2023

@HardeepAsrani I don't remember exactly what was happening here, unfortunately. IIRC, this was working ok when I submitted the PR initially. It might be that I just overlooked the bug in the editor.

@JohnPixle
Copy link
Contributor

@HardeepAsrani ok, I tested the build that you sent me in Slack, and the problem seems to be that some patterns and templates make use of the old color slugs. This is a problem for existing users, if we can't have a default fallback 🤔.

Also safe to assume that users will have already used the theme colors from the palette, so this will mess up their appearance. Any advise here? Worst case scenario we do not change the slugs, just add new colors with the raft prefix.

Sorry, I should have seen that coming earlier 😞

Screenshot 2023-11-15 at 1 20 31 PM

@JohnPixle
Copy link
Contributor

@HardeepAsrani let me know what your thought are here when you can, regarding the backwards compatibility of the color slugs. We need to sort this out relatively soon in order to use the proper colors when building the patterns 🚀

Thanks!

@HardeepAsrani
Copy link
Member

Hey, I was able to reproduce it now. I added the migration slugs to the editor as well and now the patterns do look and behave just as expected in the editor. The only issue will be that Color Picker won't show the correct color. Personally, I won't see it as the biggest issue.

Let me know your thoughts.

Screenshot 2023-11-17 at 12 53 55 AM

@HardeepAsrani
Copy link
Member

I've also replaced the color slugs in the existing patterns & templates: 10fc68d - to avoid new users using old slugs.

@JohnPixle
Copy link
Contributor

@HardeepAsrani Hey, so after some further thought after our late night discussion yesterday, I have concluded that it's better not to change the slugs. I have some bitter personal experience on doing such global-scope changes to themes and I think it will hurt us and our users more that what it is supposed to offer.

Here's an outline of my thinking:

  • Our user-base is at least 10K and even with the solution you shared (which was reasonable and clever), with the new update all these users will lose the dynamic connection between their existing colors across all pages and the global theme colors.
  • If they attempt to edit any of the theme colors, or attempt to try any of the new (or existing) theme style presets, they will be highly confused by the fact that none of their colors on the pages will change.
  • I think that we must see it in a broader context and not only focus on new users in my opinion, but ship this release to improve the experience of our existing users as well. Causing such inconvenience, might result to negative NPS, reviews, and most importantly poor quality of the experience.
  • We also have many other changes in this release, and they have to be thoroughly tested. We are already pushing changes that affect the existing appearance (new spacing etc), so it might be a good idea not to add another burden.

Why we wanted consistent color slugs across themes.

As we discussed, we wanted to have a consistent color slug system across all our themes. This could have unlocked some flexibility in the future, like users being able to use the patterns across all the themes, and maintain consistency.

When we were building Raft we created the slugs to be theme-specific, not framework-specific. I think we must own this decision and move forward, doing the best we can in a safe and scalable way from now on.

Let me know what you think. I am open to discuss this more if you want.

For now, I think we can stay with the raft- slugs. You need to undo-the commit that replaces the slugs in the theme templates and patterns, that you did yesterday. We can merge everything then into a ZIP and test it out.

I have done pretty good progress with the patterns and layout material so far, and having a theme file with all changes consolidated would vastly help.

Thanks!

@HardeepAsrani
Copy link
Member

You need to undo-the commit that replaces the slugs in the theme templates and patterns, that you did yesterday.

@JohnPixle Thanks for your thoughts. I don't understand why to undo that commit if we aren't going to go ahead with. Let me know.

@JohnPixle
Copy link
Contributor

@HardeepAsrani sorry, let me clarify. Since we are not going to use the ti-slug and we are going to stay with the old raft-slug then the commit u did that replaces the slug to the templates and patterns is no longer valid right? That's what I meant 🙂.

@HardeepAsrani
Copy link
Member

@JohnPixle Then rest of the code in this PR is also not relevant as it replaces the raft- slug in options. 😄

@JohnPixle
Copy link
Contributor

@HardeepAsrani right, got it sorry 🙈!

@selul selul closed this Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to the new color slugs we have on other block themes
6 participants