Skip to content

Handle close GlobalSearchModal gracefully - #41792

Merged
susnux merged 2 commits into
masterfrom
avoid-mutating-prop
Nov 29, 2023
Merged

Handle close GlobalSearchModal gracefully#41792
susnux merged 2 commits into
masterfrom
avoid-mutating-prop

Conversation

@nfebe

@nfebenfebe commented Nov 28, 2023

Copy link
Copy Markdown
Contributor

Sorts out re-opening errors, such as needing two clicks after clicking outside, or modal flashes.


The current close infrastructure modifies a prop which has no real effect aside bugs.

In addition, calling the NcModal.close() as the primary way to close the search modal instead of using the states defined in GlobalSearch view causing re-open bugs (Modal cannot open, needs to click twice, and other weird stuff).

Contributes to #41381

@ChristophWurstChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. Didn't test

@ChristophWurst

Copy link
Copy Markdown
Member

/backport to stable28

@artongeartonge left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that using the .sync modifier can help in such cases: https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier
But code looks good like that

@AndyScherzinger

Copy link
Copy Markdown
Member

/compile amend /

@AndyScherzingerAndyScherzinger mentioned this pull request Nov 29, 2023
3 tasks
The current close infrastructure modifies a prop which has
no real effect aside bugs.
In addition, calling the `NcModal.close()` as the primary way to
close the search modal instead of using the states defined in `GlobalSearch` view
causing re-open bugs (Modal cannot open, needs to click twice, and other weird stuff).
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@AndyScherzinger

Copy link
Copy Markdown
Member

/compile /

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@susnux

Copy link
Copy Markdown
Contributor

drone error unrelated

@susnux
susnux merged commit b213fc7 into masterNov 29, 2023
@susnux
susnux deleted the avoid-mutating-prop branch November 29, 2023 15:27
nfebe pushed a commit that referenced this pull request Nov 29, 2023
Handle close GlobalSearchModal gracefully
@nfebe

Copy link
Copy Markdown
ContributorAuthor

/backport to stable28

@AndyScherzingerAndyScherzinger added this to the Nextcloud 29 milestone Nov 29, 2023
nfebe added a commit that referenced this pull request Nov 30, 2023
[stable28] Handle close GlobalSearchModal gracefully #41792
@blizzzblizzz mentioned this pull request Mar 5, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsfeature: search

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants

@nfebe@ChristophWurst@AndyScherzinger@susnux@artonge@skjnldsv@nextcloud-command