-
Notifications
You must be signed in to change notification settings - Fork 91
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: Add toggle for editor line length per user #6569
base: main
Are you sure you want to change the base?
feat: Add toggle for editor line length per user #6569
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Hi @azri-cs 👋 Looks like this is your first PR to text. 🎉 ❤️ Thanks a lot for contributing! I hope we can walk you through finalizing this. First of all, let's check in with @nextcloud/designers to hear if the ui matches their expectations. In the meantime we can try and address the failing tests: DCOThe DCO check is complaining about your signoff message in the commits like this: If you use git on the command line you can add a signoff message to the last commit with Lint PHP-csAt first sight this looks like it's mostly about indentation. Can you see the error message the workflow printed? It has a detailed diff of what needs to be changed. PsalmThis also looks related: I hope these are helpful pointers to address these. If you get stuck feel free to ask. I will also take a first look at the code to see if I find something to comment upon. |
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.
Code wise this looks good.
I noticed that you added a string config setting - but I think a boolean would do. If I read #4024 correctly it's either full width or default line length.
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.
The whitespace of this file somehow changed so that your commit seems to change every line inside the file.
This would be confusing when looking at the history for a given line.
Please try to leave the whitespace untouched. In the server repo there is a .editorconfig file that will tell most editors how we like our indentation.
This may not have any effect for two reasons:
- You may need an editorconfig extensions / configuration setting to make sure your editor reads
.editorconfig
files. - The
.editorconfig
file needs ot be in a parent directory of the text repository. Maybe your text repo is not located inside your server repo. I also have that situation.text
lives incode/nextcloud/text
on my machine. So I copied the.editorconfig
tocode/nextcloud
where it will also affect text.
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.
Hi Max,
Thank you for pointing that out. I have pushed the fixes for sign-off issue, whitespaces and backend test failure.
Upon reading back the requirements, yes I agree boolean is better since it's a checkbox and there are only 1 option and 1 default. My latest push have implemented this. |
Dear @azri-cs Thanks for changing the approach and using a boolean. That looks good to me. The linters are still not quite happy. They mostly disagree about the use of whitespace here and there. For php i'm less familiar but my understanding is that you will need to run |
Sorry for the inconvenience caused. I've followed your advice to use |
Hey @azri-cs Could you squash the commits? |
Signed-off-by: Azri Adam <[email protected]>
236e15d
to
e67590a
Compare
No worries. I've squashed my commits into one commit. Thanks a lot, I've learnt a lot. |
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.
Very nice contribution @azri-cs! :) I only have 1 feedback: I would expect a setting like this to be in the collapsed part of the toolbar along with these other more info/settings like items, as the "people" menu is more focused on collaboration and sharing.
(Also, this setting is disabled by default, right?)
@jancborchardt I'm considering this as a follow up, as I scoped the task for @azri-cs to put it explicitly in that menu in the beginning. |
@juliusknorr @azri-cs sure, doing it as a follow-up is fine for me too. :) My remark does make sense though right, or would you still prefer your originally suggested placement? |
📝 Summary
Fixes #4024
After some direct alignment with designers, we basically want to offer a per user setting to allow users changing between a full line length and a compact line length display mode.
🖼️ Screenshots
B | A
🏁 Checklist
npm run lint
/npm run stylelint
/composer run cs:check
)