Fix unsetting language#4501
Conversation
rtibbles
left a comment
There was a problem hiding this comment.
Makes sense to me! Need the null value for Dexie to pick up the change event. I have not manually tested though.
|
@AlexVelezLl The one thing I noticed in your bulk editing branch was that there was no option to unset the language, i.e. use the default behavior of the folder's language. Perhaps this was an oversight in the original design. That lead me to 'can this be done currently', which you could but it was broken, hence the bug. I'm thinking for apples to apples comparison, it might be good to retain this ability in the bulk language editing modal? |
|
Hmm we can make the Radio Button clearable, so if a user clicks again on the selected radio button we unselect the language? Could this work? @bjester |
|
@AlexVelezLl Yeah you might ask in #product or #design on slack what might be best. My thought was that a dedicated radio button for 'Use folder language' would make sense but that isn't my call. |
Summary
Description of the change(s) you made
This PR fixes the bug when removing the language from a node. Until now, when deleting a language it was set to undefined, so the Changes model did not detect it as a change. Changing the saved value to null forces the Changes model to know that this value has been removed.
Manual verification steps performed
References
Fix #4493.
Contributor's Checklist
PR process:
CHANGELOGlabel been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocslabel has been added if this introduces a change that needs to be updated in the user docs?requirements.txtfiles also included in this PRStudio-specifc:
notranslateclass been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages,components, andlayoutsdirectories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarnandpip)