-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: 🍰 Post Editor Legend #4492
Conversation
package.json
Outdated
}, | ||
"dependencies": { | ||
"jq": "^1.7.2" |
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.
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.
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.
Hey @Mogge , isn’t this needed for the webapp only? And not for the main folder … 🤔
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 runs over the scripts
folder in the main folder. So I guess it is right there. We have to see what happens when running yarn locales
.
webapp/components/Editor/MenuBar.vue
Outdated
data() { | ||
return {} | ||
}, |
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.
In case it is empty you can leave it away, I guess. @Blargian 👍🏼
yarn.lock
Outdated
bindings@^1.2.1: | ||
version "1.5.0" | ||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" | ||
integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== | ||
dependencies: | ||
file-uri-to-path "1.0.0" | ||
|
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.
same same ☝🏼
Hey @Blargian ! This looks quite nice for a start. 🤗😍 I have left you little hints … |
return { | ||
hover: false, | ||
legenditems: [ | ||
{ iconname: 'bold', name: 'bold', shortcut: 'Ctrl+b' }, |
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.
Fett
hover: false, | ||
legenditems: [ | ||
{ iconname: 'bold', name: 'bold', shortcut: 'Ctrl+b' }, | ||
{ iconname: 'italic', name: 'italic', shortcut: 'Ctrl+i' }, |
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.
Kursiv
{ iconname: 'bold', name: 'bold', shortcut: 'Ctrl+b' }, | ||
{ iconname: 'italic', name: 'italic', shortcut: 'Ctrl+i' }, | ||
{ iconname: 'underline', name: 'underline', shortcut: 'Ctrl+u' }, | ||
{ iconname: 'link', name: 'link', shortcut: '' }, |
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.
Unterstrichen
{ iconname: 'italic', name: 'italic', shortcut: 'Ctrl+i' }, | ||
{ iconname: 'underline', name: 'underline', shortcut: 'Ctrl+u' }, | ||
{ iconname: 'link', name: 'link', shortcut: '' }, | ||
{ iconname: 'paragraph', name: 'paragraph', shortcut: '' }, |
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.
Absatz
{ iconname: 'underline', name: 'underline', shortcut: 'Ctrl+u' }, | ||
{ iconname: 'link', name: 'link', shortcut: '' }, | ||
{ iconname: 'paragraph', name: 'paragraph', shortcut: '' }, | ||
{ label: 'H3', name: 'heading 3', shortcut: '### + space' }, |
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.
Überschrift 3
{ iconname: 'link', name: 'link', shortcut: '' }, | ||
{ iconname: 'paragraph', name: 'paragraph', shortcut: '' }, | ||
{ label: 'H3', name: 'heading 3', shortcut: '### + space' }, | ||
{ label: 'H4', name: 'heading 4', shortcut: '#### + space' }, |
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.
Überschrift 4
{ iconname: 'paragraph', name: 'paragraph', shortcut: '' }, | ||
{ label: 'H3', name: 'heading 3', shortcut: '### + space' }, | ||
{ label: 'H4', name: 'heading 4', shortcut: '#### + space' }, | ||
{ iconname: 'list-ul', name: 'unordered list', shortcut: '* + space' }, |
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.
Ungeordnete Liste
{ label: 'H3', name: 'heading 3', shortcut: '### + space' }, | ||
{ label: 'H4', name: 'heading 4', shortcut: '#### + space' }, | ||
{ iconname: 'list-ul', name: 'unordered list', shortcut: '* + space' }, | ||
{ iconname: 'list-ol', name: 'ordered list', shortcut: '1. + space' }, |
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.
Geordnete Liste
{ label: 'H4', name: 'heading 4', shortcut: '#### + space' }, | ||
{ iconname: 'list-ul', name: 'unordered list', shortcut: '* + space' }, | ||
{ iconname: 'list-ol', name: 'ordered list', shortcut: '1. + space' }, | ||
{ iconname: 'quote-right', name: 'quote', shortcut: '> + space' }, |
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.
Zitat
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.
I gave you the German translations for the legend. What happens, if you run
yarn locales --fix
in the webapp folder?
Thanks for the German translations! yarn locales --fix
runs two scripts in scripts/translations, they both result in "jq: command not found". I tried removing jq from the main package.json file and adding the dependency just to the webapp but it gives the same message. An empty [].json file gets added to the locales.
I was able to sort the locales by running sh sort.sh --fix
from within scripts/translations. Doing the same for missing-keys.sh gives an error:
missing-keys.sh: eval: line 10: syntax error near unexpected token
(' missing-keys.sh: eval: line 10:
diff -q <( jq -f ./../../scripts/translations/sort_filter.jq ./../../webapp/locales/en.json | jq
-c 'path(..)|[.[]|tostring]|join(".")' ) <( jq -f ./../../scripts/translations/sort_filter.jq ./../../webapp/locales/de.json | jq
-c 'path(..)|[.[]|tostring]|join(".")' )'
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.
Could this be related? https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/.github/workflows/test.yml#L25
I am not sure about all those translation tools & checks, but we have two scripts executed in our test workflow.
@Mogge
{ iconname: 'list-ul', name: 'unordered list', shortcut: '* + space' }, | ||
{ iconname: 'list-ol', name: 'ordered list', shortcut: '1. + space' }, | ||
{ iconname: 'quote-right', name: 'quote', shortcut: '> + space' }, | ||
{ iconname: 'minus', name: 'ruler', shortcut: '---' }, |
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.
Linie
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.
I gave you the German translations for the legend. What happens, if you run yarn locales --fix
in the webapp folder?
I pushed now the changes so that the legend displays when the user hovers over it. It is also now localised for English, Deutsch and Russian so I think the functionality is all there now. I'm getting some tests failing however - one of the backend unit tests and one of the cyprus tests. |
Hi @Tirokk, I fixed up one issue which was causing a cypress test to fail. Also removed jq as a dependency all together as it also seemed to be causing some tests to fail. |
- Remove the split line under the last list item. - Enter spaces. - Partial swapping of upper and lower case letters.
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.
Hey @Blargian ,
I’m back from holidays 🏝 and have reviewed your PR.
Thanks for your patience and sorry for the delay! 🙏🏼
You did a really great job. Very cool 😍🚀💫💫
I have taken the liberty of changing a few small things that I noticed. Nothing serious. 👍🏼
Hope that’s okay for you?
Please merge, if the tests are successful! 🥰
PS: Please let me know if you like to care for those things for your own in the future.
Hey dear @Blargian , |
Hi @Tirokk! Sorry for not replying. I saw your message and then got a bit busy and forgot to respond. Of course I don't mind for you to make some changes. 🤗 Thank you |
There is an console warning I and @Blargian have overseen: #3673 (comment) I try to fix this … |
🍰 Pullrequest
Added a new component called MenuLegend (adapted the content menu component) with localised content for Deutsch, English and Russian. The legend displays when the user hovers over it (desktop) or when the user clicks on the button (mobile/tablet).
Issues
fixes #3673
Todo