Currently, these buttons are clickable on the desktop app even without an active notebook, but they don't execute. However, this can confuse users who see the buttons but get no response on click.
Recommendation: Make the buttons visually disabled until a new notebook is created. This provides immediate visual feedback .
It is just an enhancement to the existing features.
Please let me know your views on this.
Thanks!
2 Likes
Should I work on this and create an issue? My current solution works on the dev environment.
The buttons are enabled when the windowState.notesParentType === ‘SmartFilter’. So just by adding a condition to check whether this is true or false we can enable or disable the Buttons.
Please Let me know your views on this.
Thanks
It is valid to create notebook regardless of whether a smart filter is used or not (eg it should allow you to create notes when all notes is selected). Aside from any existing rules, you could disable the buttons if no not trashed notebooks exist, by checking that Folder.getValidActiveFolder() returns a not null value.
The mobile app already hides the new note button when this is the case, so this is only an issue on the desktop app
Yes ,This enhancement is only for the desktop application as mentioned in my Title and I used Folder.getValidActiveFolder() it works. I understand your point of not using smart filter.
Thank you for sharing your views on this topic. Should I create an issue,test this and create a PR on it?
Rather than disabling them would it be preferable to prompt for notebook creation (newFolder dialog)?
But then again if the mobile app does it by disabling the new note button then it probably makes sense to keep the behaviour the same across both apps.
@Daeraxa You could do it that way, though personally I think it would be better for the new note button to have a single responsibility rather than a conditional path. If you wanted to make it clearer a notebook is needed, in addition to disabling the new note buttons, in the notebook list you could add a message about needing to create a notebook before you can create a note.
FYI the mobile app hides the new note button rather than disabling it
Actually I don’t think this is issue an issue which needs addressing. The described issue does happen on the dev build of Joplin desktop, but it doesn’t happen on the release build if you delete the Welcome notebook, even after restart. Instead of the buttons being present and doing nothing, they are removed completely when there is no eligible notebook to create a note in.
EDIT: Ok I take that back. The issue does occur if you create a new profile on the release build. But now we know to intended behaviour.
I have created issue Desktop: When creating a new profile, the new note and new todo buttons are enabled but do nothing · Issue #14661 · laurent22/joplin · GitHub for this