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

fix(content-manager): return default locale #20237

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

yurimutti
Copy link
Contributor

What does it do?

Added key on InjectionZone to reset internal states.

Now with params.locale as key. Default locale can be persisted after user click on collection.

Why is it needed?

Locale filter doesn't have correct locale loaded when user click on collection type again.

How to test it?

  • npx create-strapi-app@latest my-project --quickstart
  • log into Strapi V4
  • Select Resources collection from Content Manager
  • on the right hand side top of the resource table/ index, select a locale from the locale drop down
  • then click Resources collection on the left nav list

Related issue(s)/PR(s)

Fix #20209

Copy link

vercel bot commented Apr 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
contributor-docs ❌ Failed (Inspect) May 3, 2024 10:12am

@yurimutti
Copy link
Contributor Author

ezgif-6-0cf907f3f0

@yurimutti yurimutti changed the title Fix/return default locale Fix: return default locale Apr 30, 2024
@yurimutti yurimutti changed the title Fix: return default locale fix: return default locale Apr 30, 2024
@yurimutti yurimutti changed the title fix: return default locale fix(content-manager): return default locale Apr 30, 2024
@joshuaellis joshuaellis added the flag: don't merge This PR should not be merged at the moment label Apr 30, 2024
@joshuaellis
Copy link
Member

Can you rebase off develop please, your PR should not have this many commits.

Also I'm not sure this is the appropriate solution, I think we should be looking at how the injected component works in i18n rather than trying to solve it in the CM.

This also assumes i18n is installed and adds locale which isn't necessary true and pollutes the CM domain with i18n concepts, something we try to avoid where possible.

@yurimutti
Copy link
Contributor Author

yurimutti commented May 1, 2024

Can you rebase off develop please, your PR should not have this many commits.

Also I'm not sure this is the appropriate solution, I think we should be looking at how the injected component works in i18n rather than trying to solve it in the CM.

This also assumes i18n is installed and adds locale which isn't necessary true and pollutes the CM domain with i18n concepts, something we try to avoid where possible.

Yes, one agnostic solution works in i18n makes total sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: don't merge This PR should not be merged at the moment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Returning to Default Locale (EN) does not Reset the Filter
2 participants