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

Update linkfield developer doc regarding fluent #237

Open
maxime-rainville opened this issue Feb 26, 2024 · 7 comments
Open

Update linkfield developer doc regarding fluent #237

maxime-rainville opened this issue Feb 26, 2024 · 7 comments

Comments

@maxime-rainville
Copy link

maxime-rainville commented Feb 26, 2024

Context

We've reviewed the high level compatibility of Fluent with LinkField.

We've identified some upstream problems that make it difficult to fully accommodate Fluent with LinkField. Althought the simpler use case seemed to work pretty well.

User story

As a Fluent developer, I want clear guidance on how to get simple LinkField usage to work with Fluent so I can build interfaces that meet needs of my content authors.

Acceptance criteria

  • The LinkField doc has a section about localisation with Fluent. The section includes.
    • A basic example of how to translate a single Link relation for a page.
  • The limitation around translating has_many relations is called out
  • Links to relevant Fluent doc are added where relevant.

Related card

PRs

@GuySartorelli
Copy link
Member

The docs for this should really just link to fluent docs - if even that. Really i don't think we need anything more than "has_one relations are compatible with fluent, but has_many relations are not" and a link to fluent.

@emteknetnz emteknetnz changed the title Update developer doc Update linkfield developer doc regarding fluent Feb 26, 2024
@maxime-rainville
Copy link
Author

I could live with a simple "Fluent compatibility" section that make clear what works and doesn't work with Fluent.

@maxime-rainville
Copy link
Author

@emteknetnz identified a potential Gridield issue during refinement that would block this card. He will create a matching card for it.

@emteknetnz
Copy link
Member

emteknetnz commented Apr 4, 2024

These AC's just don't seem good. This really does not belong in the 5.2.0 change log IMO.

I have this currently ([!Note] section is new):

...

Once the above have all been resolved, you can use that documentation and copy the relevant `BuildTask` code into your projects if you need it. These will be included in `silverstripe/linkfield` directly in the next minor release.

> [!NOTE]
> When using the optional [fluent module](https://github.com/tractorcow-farm/silverstripe-fluent) you can only translate `has_one` single `Link` relations and not the `has_many` multi-relations.
> If using content blocks you can make a `has_many` relation translatable without the `Link` relation itself being translatable. (Each localised instance of the block will have a different `Link` DataObject) 
> Read more about [configuring fluent](https://github.com/tractorcow-farm/silverstripe-fluent/blob/7/docs/en/configuration.md).

Check out [the linkfield documentation](/optional_features/linkfield/) for more information about this module.

...

It seems wildly out of place in the rest of the linkfield section of the changelog having specific information about fluent while we do not mention any other optional modules

Also I have no idea what the AC "Make a custom content block with an has_many Link relation translatable with Fluent without the Link relation itself being translatable. (Each localised instance of the block will have different Link DataObject)" even means. It sounds like a very specific fluent customisation to try and work around the lack of has_many support, but at the same time we're mentioning one line that has_many is not supported just one line above.

I think we should modify the AC's in two ways:

  • Mention fluent in the linkfield docs, not in the changelog which is much higher level
  • Not mention has_many workaround, instead just link to the customisation section in the fluent docs

I'm going to move this back to refinement for discussion.

@emteknetnz emteknetnz removed their assignment Apr 9, 2024
@GuySartorelli GuySartorelli self-assigned this Apr 9, 2024
@GuySartorelli GuySartorelli removed their assignment Apr 10, 2024
@GuySartorelli GuySartorelli removed their assignment Apr 10, 2024
@GuySartorelli
Copy link
Member

GuySartorelli commented Apr 10, 2024

Back in refinement as per #273 (comment)

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.

TL;DR there are some UX issues with fluent when archiving links for both has_one and has_many.

@maxime-rainville maxime-rainville self-assigned this May 5, 2024
@maxime-rainville
Copy link
Author

I would like to see if the issue is fixable before we document it as something that needs to be worked around.

@GuySartorelli
Copy link
Member

Validation for this is going to be done in #285

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

No branches or pull requests

3 participants