-
Notifications
You must be signed in to change notification settings - Fork 18
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" button to close kanban and disable auto closing #44
Conversation
@@ -127,10 +127,9 @@ async function reloadConfig(noteId: string) { | |||
const valid = ymlConfig !== null && (await board.loadConfig(ymlConfig)); | |||
if (valid) { | |||
openBoard = board; | |||
} else { | |||
openBoard = undefined; |
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.
wouldn't it be good to set openBoard as undefined in this case?
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.
Remove the code to prevent the board from closing automatically and keep the current board working.
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.
If it set to undefined, I am afraid the current board will not be working any 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.
Ok, I'll need more time to understand the code on my side then
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.
Ok, after additional test, this part is ok
This works as described. The board lifecycle seems to have change a bit, but it seems ok. Not sure that the initial feature request suggested to also disable the "auto closing". In this case this could be an option. |
@mhelleboid Thanks for reviewing! yes, the auto closing is not described in the feature requirement. However, as we now have a Example:
Disable the auto closing feature could save the time for reloading in step 4 @PackElend , what do you think? |
Ok the scenario makes sense, and I agree that this is a good thing |
Sounds good but let me check the history why auto close exsist |
@PackElend thx. If it is approved, I may try to work on a feature to drag a note from note list to a Kanban column directly. |
could find anything and still don't see a reason to keep auto close but others may think differently. |
let's wait for a week, if it is not significant response I'll merge it |
@benlau please go ahead but open a topic in the forum as well, to allow the community to join the development :) |
@@ -273,12 +276,19 @@ async function handleKanbanMessage(msg: Action) { | |||
* the domain of the current board. | |||
*/ | |||
async function handleNewlyOpenedNote(newNoteId: string) { | |||
|
|||
if (openBoard) { | |||
if (openBoard.configNoteId === newNoteId) return; | |||
if (await openBoard.isNoteIdOnBoard(newNoteId)) return; | |||
else { |
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.
this code was already there, but is this "else" useful?
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.
Yes. Let's say you have opened Kanban A note , and then open another Kanban B note, the else code handle this condition and replace the the board to Kanban B. If no such code, you need to close the current board and then open the Kanban note B manually.
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.
Remark: The reloadConfig() replace the "openBoard" variable. That is why it looks a bit weird.
The code and the PR is ok for me, from a technical and functional (auto close) point of view |
@benlau do you want to add some comments / do changes due to the latest review, if necessary? So that I can merge it. |
@PackElend I think it should be ready to merge. thx |
@benlau Sorry to comment on this old pr, but how do I activate this feature? The button is missing on my end. |
@AndiLeni I think the change is not published yet. @PackElend Do you have the permission to release a new version? |
will check |
Eventually GSoC is rolling smoothly and we are looking into other things.
do you get the same when you do that? it is discussed in https://discord.com/channels/610762468960239627/919979500765335613/1240377195730440274 |
#50 could fix it, let's see. |
Implements #21