[#545] Toggle button to hide/show romanization added #551
+115
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@bhavinip and I added a button to show/hide romanization as suggested in #545!
We extended it beyond Chinese and made it so that the button shows up in all languages that have romanization information available. We also made it so that it does not show up in languages that do not have the information available. In the default state the romanization is displayed and the button (positioned above it) says 'Hide romanization.' When the button is pressed it hides the romanization and then says 'Show romanization.' This part was implemented in Word.vue.
We also wanted to keep the button consistent with letra's existing aesthetic so when you hover over it, it turns yellow like the other buttons and the cursor also changes to a pointer! (made changes in app.scss for this).
Finally, we also added some tests in the file Word.test.js that check to make sure that: