Closed GuySartorelli closed 5 months ago
Sorting has_many in one locale will unexpectedly sort the links in the other locale which is very unexpected
I disagree - I think that is very expected. I think in most cases you would want the links in the same order for all locales and only change the text. Imagine having to go through all of your locales every time you want to change the order of links - what a nightmare!
If developers want to sort the links differently per locale, that is doable but goes beyond the basic scenario I have documented here - people who want that probably are already doing that kind of thing elsewhere in their project as well - but if not, they can read the fluent docs to look for information about how fluent works.
I want to avoid duplication of documentation as much as possible.
Archiving a link does nothing. Try refreshing the page after deleting it.
It archives the specific version you have in that locale. After you refresh, you see the version of the link which is stored in the fallback locale. Notice the title of the link is different before and after archiving in this video:
Screencast from 10-04-24 16:19:02.webm
There are a couple of UX issues here:
Those UX issues are not in the scope of this PR, which is just adding documentation. If you want, I can document these UX issues.
I think it's simply a case that "has_many doesn't work"
I disagree. As stated above, it seems like there are just a few UX issues that need to be ironed out.
The archiving UX problem is not specific to has_many
either - that's the behaviour for all links, even has_one
.
If we want to say that fluent works correctly, though there's some caveats, and we need to do more work on linkfield to get fluent to work as you think it should, then it's too soon to merge these docs as they are where "fluent has_many works" where IMO it really doesn't
I think this one needs to go back in refinement for discussion to work out what we want to do with fluent since it sounds like there's a bunch more work to do.
You're focusing a lot on has_many
but the only outstanding issues seem to be around archiving, which as I noted affect has_one
as well.
In any case, I've put the issue back into refinement and I'll close this PR.
Description
Documents localising links with fluent.
Note that this won't work unless https://github.com/silverstripe/silverstripe-framework/pull/11195 is also merged. You can work around that by adding this configuration:
Original fluent spike
Issues