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

Only update language if a field is edited in Edit view and is not empty when saved #1394

Open
troughc opened this issue Oct 9, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request estimate needed Add estimate for planning

Comments

@troughc
Copy link
Contributor

troughc commented Oct 9, 2024

Reference user story: #1371

Current behaviour - to be replaced with new behaviour

Events: Publishing an entity creates literals in a language field based on the displayed fallback language when the field was not touched
Events: Saving an event entity does NOT create a literal in a language field based on the fallback language when the field is not touched
Place/Person/Org: Saving an entity creates a literal in a language field based on a displayed fallback language when the field was not touched

New behaviour

  1. Make events, places, persons and orgs all behave the same way when it comes to creating a literal in a language field.
  • Remove the difference between saving and publishing in Events
  • Make Save behave the same across all classes / entity types using Event saving behaviour as the model
  1. Saving (publishing) an entity will only create a literal in a field that a user explicitly touched (edited) and has something in it (a text string). It will not create a literal in a field that is untouched:
  • All entities: Saving an event entity will NOT create a literal in a language field based on the fallback language when the field is NOT touched
  • Events: Publishing an event entity will NOT create a literal in a language field based on the fallback language when the field is NOT touched
  1. Warnings will continue to appear to inform the user that there is content doesn't match the language on the website until all fields have been touched / updated (I believe this continues to work as is, no change)
  2. In Edit view: what happens if the user touches / clicks in a field and deletes the fallback language text that is displayed, but does not replace it with anything (i.e. leaves the field empty)? A literal will not be created, i.e. we will NOT create a literal that is blank upon saving/publishing. Instead, the next time someone views that entity in Edit mode, the fallback language will be displayed.
  3. TO BE DECIDED for Read-only view: I am still debating which approach to take if a fallback language is being displayed because there is no language literal. In the read-only view, should we:
  • Show a field as empty, i.e. stop displaying the fallback language?
  • Display the fallback language in the field and display the language literal tag (this would be a change)?
  • leave it as is
  1. In List views: leave it as is, no change.
@troughc troughc added enhancement New feature or request estimate needed Add estimate for planning labels Oct 9, 2024
@troughc
Copy link
Contributor Author

troughc commented Oct 9, 2024

@SyamBabu-M here is another ticket for you. Please go ahead and estimate and start work when you have time.

@saumier
Copy link
Member

saumier commented Oct 9, 2024

@troughc Looks good.

@saumier saumier removed their assignment Oct 9, 2024
@SyamBabu-M
Copy link
Contributor

@troughc @saumier What happens when "dismiss" is pressed in the banner, which indicates there are language fallbacks present?
Currently, pressing dismiss will enable all fallback values to be their active value. And upon saving these values will be saved.

@SyamBabu-M SyamBabu-M assigned troughc and unassigned SyamBabu-M Oct 15, 2024
@SyamBabu-M SyamBabu-M added the question Further information is requested label Oct 15, 2024
@troughc
Copy link
Contributor Author

troughc commented Oct 15, 2024

@troughc @saumier What happens when "dismiss" is pressed in the banner, which indicates there are language fallbacks present?
Currently, pressing dismiss will enable all fallback values to be their active value. And upon saving these values will be saved

@SyamBabu-M 'Dismiss' should not enable the fallback languages to be the active value which is then saved (the fallback languages as the actual values). Dismiss is used by a user to close the banner only.

The big idea/goal is that the user intentionally sets (chooses) the fallback language as the active value. Let me know if you need any further clarification.

@troughc troughc removed the question Further information is requested label Oct 15, 2024
@troughc troughc assigned SyamBabu-M and unassigned troughc Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request estimate needed Add estimate for planning
Projects
None yet
Development

No branches or pull requests

3 participants