-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Notebook Properties Dialog clean Branch for review #2450
Conversation
@laurent22, we have life. The linter was still acting up but here you are. |
Please provide a screenshot of the dialog you've created. |
And a screenshot of the app with the icons in the sidebar please. |
Before I make most of these corrections, i need some information. I've been using much of the current code as references for the styling and it is obvious that isn't the correct way to handle it. Due to both NotePropertiesDialog and ShareNoteDialog having inconsistent stylings and large chunks of the prior being custom styled, can I please get a style reference for what you are wanting? How set in stone are the styles in theme.js? |
It is set in stone. Styling across the app is relatively inconsistent but it's been getting better over the past versions. For example before there was many styles for buttons, but now I've converted many to use theme.button. Same for dialog boxes which had various styles, but recently I've created theme.dialogModalLayer and DialogButtonRow, which you've correctly picked up. So it's more of an incremental effort. For that particular pull request, I've checked again and for now let's leave it as it is but it will have to be made more consistent later. |
Thanks for getting back to me on this. I can see the whole inconsistent styling be super infuriating. It definitely is for me and could possibly lead to others having the same problem. |
Not perfect yet, but here are the screenshots you asked for, @laurent22. I haven't touched the styling much yet outside of just basic renaming and condensing to one style but have a better understanding of it after fully studying the theme.js file during work. |
App.js would need to be changed in several locations for this bug to be functional. Due to that being outside of the scope of the current project and I haven't studied it enough yet, I'm leaving parts of the MainScreen code as Notebook for the time being until further notice. |
bridge().showErrorMessageBox(_('Please create a notebook first.')); | ||
bridge().showErrorMessageBox(_('Please create a folder first.')); | ||
} else { | ||
await createNewNote(null, false); | ||
} | ||
} else if (command.name === 'newTodo') { | ||
if (!this.props.folders.length) { | ||
bridge().showErrorMessageBox(_('Please create a notebook first')); | ||
bridge().showErrorMessageBox(_('Please create a folder first')); |
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.
Sorry just to be clear: internally, in code, we use the term "folder" everywhere. In strings visible by the user however we use "Notebook", so please revert these two changes.
@@ -665,6 +665,10 @@ class JoplinDatabase extends Database { | |||
queries.push(this.addMigrationFile(27)); | |||
} | |||
|
|||
if (targetVersion == 28) { | |||
queries.push('ALTER TABLE folders ADD COLUMN `icon` TEXT NOT NULL DEFAULT ""'); // 1: Folder, 2: Icon |
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 remove the comment (I don't think it's relevant to this line).
|
I am sorry to do this to you after coming as far as I have, but I would like to take a step back from contributing and being a member of this project outside of being a user and sponsoring like I currently am. I came to the realization last night as I was packing up my laptop at the coffee shop I spent the night at that I'm obsessing too much over this one contribution and this project from an unhealthy angle that introduces a toxic element into the fold. Since this is my first contribution here and I haven't been a part of this community for long, I'd like to keep my dignity and give reigns over to someone who can make a positive difference here. I thank you for understanding. |
No problem, and thanks for giving it a try anyway. To be fair, it wasn't an easy first issue, I think it was a bit mislabelled as there was a lot of concepts to grasp, yet you went quite far through it! It also allowed us to better understand the issue and how it should be implemented (for example I would have done the dialog differently, with just one Save button, but your approach makes more sense actually), so well done. Let's close the pull request then, and it can always be a starting point if someone else wants to take over. |
Here's a cleaned up NotebookPropertiesDialog branch.