-
Notifications
You must be signed in to change notification settings - Fork 188
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
Quick edit modal for content language #4355
Quick edit modal for content language #4355
Conversation
7a110e4
to
c2ea655
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using setTimeout
in tests is not recommended may make the tests unreliable. You could consider using requestAnimationFrame
or throttling instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is an example that uses the requestAnimationFrame
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see https://github.com/learningequality/studio/pull/4355/files#r1444647223 for consideration!
} | ||
const criteria = ['id', 'native_name', 'readable_name']; | ||
return LanguagesList.filter(lang => | ||
criteria.some(key => lang[key]?.toLowerCase().includes(searchQuery)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's worth-noting that the chaining operator(?.
) is not supported in IE 11 that we are still supporting(The last time i checked) :(.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks correct to me! I have left a few general comments for your consideration. Great work @AlexVelezLl
Thanks! @akolson I have replaced the setTimeout (didnt know about the requestAnimationFrame, thank you!!), and removed the chaning operator 🙌. |
0744636
into
learningequality:studio-usability-enhancements
Summary
Description of the change(s) you made
Add a quick edit modal to edit content nodes languages. Also add an checkbox to update descendants languages, but this does not work for now until #4372 is merged.
Screenshots
Compartir.pantalla.-.2024-01-05.09_39_40.mp4
Reviewer guidance
How can a reviewer test these changes?
References
Closes #3415
Comments
The "clear" button on the search textbox should be included on KDS first, and we should add just a prop in this code.
Contributor's Checklist
Studio-specifc:
notranslate
class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages
,components
, andlayouts
directories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarn
andpip
)