Skip to content
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

Add 'close note' method #2592

Closed
macsunmood opened this issue Aug 19, 2022 · 13 comments
Closed

Add 'close note' method #2592

macsunmood opened this issue Aug 19, 2022 · 13 comments
Labels
Milestone

Comments

@macsunmood
Copy link

Expected behaviour

  • a closeNote method should close tab with a given Note.

Along with 'Fetch a list of all notes with tag(s)' (#2582), "Jump to a note tag" (#2584), as well as already existing 'Set current note' features, this would allow making full Tabs Sessions support.

@pbek
Copy link
Owner

pbek commented Aug 19, 2022

What use would such a function have?

@macsunmood
Copy link
Author

macsunmood commented Aug 19, 2022

What use would such a function have?

It will allow switching different sets of tabs layouts (Workspaces or Sessions).

@pbek
Copy link
Owner

pbek commented Aug 20, 2022

How would you know which tabs are open?

@macsunmood
Copy link
Author

macsunmood commented Aug 20, 2022

How would you know which tabs are open?

Maybe keep a fetchable list of currently open notes, or a corresponding attribute should be added to the NoteApi?

@pbek
Copy link
Owner

pbek commented Aug 20, 2022

All those take a long time to implement (for one single user 😉). But feel feel to open a feature request...

@macsunmood
Copy link
Author

What else needed to open a feature request besides this existing issue?

@macsunmood
Copy link
Author

So, can this issue be labeled as a feature request, or another one should be created ?

@pbek pbek added Type: Feature adds functionality Importance: Low and removed Type: Support labels Aug 22, 2022
@pbek
Copy link
Owner

pbek commented Aug 22, 2022

Yes

@pbek
Copy link
Owner

pbek commented Aug 25, 2022

It's a bit tricky. There will more like an API to close a note tab at a specific index (0 ... n).

pbek added a commit that referenced this issue Aug 25, 2022
@pbek
Copy link
Owner

pbek commented Aug 25, 2022

22.8.4

  • there now is a new scripting command mainWindow.removeNoteTab(index) to
    close a note tab on a specific index (for #2592)

@pbek pbek added this to the 22.8.4 milestone Aug 25, 2022
@pbek
Copy link
Owner

pbek commented Aug 25, 2022

There now is a new release, could you please test it and report if it works for you?

@macsunmood
Copy link
Author

Thank you! It works pretty well, but now I need a way to retrieve a list of all open tabs containing their notes.
Maybe some Q_PROPERTY for MainWindow as by analogy Q_PROPERTY(QQmlListProperty<NoteApi> notes) exists for TagApi?

@pbek
Copy link
Owner

pbek commented Aug 28, 2022

You could create a feature request, but with the APIs I created over the last weeks for you are already able to close all open tabs and load a new set of tabs when the workspace is changed. So I'm eagerly awaiting a first version of a script as pull request on https://github.com/qownnotes/scripts 😉

@pbek pbek closed this as completed Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants