Skip to content

Conversation

@artonge
Copy link
Contributor

@artonge artonge commented Sep 22, 2025

This setting existed already for the legacy unified search.
This commit expose that setting to the new front-end, and also ignore non-valid requests in the backend.

We also take the opportunity to register the config in the lexicon.

Empty query Short query Valid query
Screenshot From 2025-09-22 15-37-38 Screenshot From 2025-09-22 15-38-08 Screenshot From 2025-09-22 15-38-13

@artonge artonge requested review from a team as code owners September 22, 2025 13:43
@artonge artonge requested review from icewind1991, nfebe, sorbaugh and susnux and removed request for a team September 22, 2025 13:43
@artonge artonge self-assigned this Sep 22, 2025
@artonge artonge requested review from Altahrim and skjnldsv and removed request for icewind1991 and sorbaugh September 22, 2025 13:43
@artonge artonge added enhancement 3. to review Waiting for reviews feature: search javascript php Pull requests that update Php code labels Sep 22, 2025
@artonge artonge added this to the Nextcloud 33 milestone Sep 22, 2025
@artonge artonge added the pending documentation This pull request needs an associated documentation update label Sep 22, 2025
@artonge
Copy link
Contributor Author

artonge commented Sep 23, 2025

There is already such a setting in the legacy unified search component. Will investigate.

Edit: I updated the code to reuse the existing config.

@artonge artonge force-pushed the artonge/feat/unified_search_add_min_length_setting branch 6 times, most recently from 627aee9 to 4f18962 Compare September 24, 2025 10:05
@artonge artonge changed the title feat(Unified search): Add min search length setting feat(Unified search): Use existing min search length setting Sep 24, 2025
@artonge artonge force-pushed the artonge/feat/unified_search_add_min_length_setting branch from 4f18962 to fa88d6e Compare September 24, 2025 10:11
@artonge
Copy link
Contributor Author

artonge commented Sep 24, 2025

/backport to stable32

@artonge
Copy link
Contributor Author

artonge commented Sep 24, 2025

/backport to stable31

@artonge artonge force-pushed the artonge/feat/unified_search_add_min_length_setting branch from fa88d6e to 12999ed Compare September 24, 2025 12:47
Copy link
Member

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

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

Non blocking, but ideally we should use the same sentence whether we have 0 or 1 char in the search field. The current proposal would result in a distracting flickering of the empty content string, unless it's debounced.

So from my pov either:

  • say "Start typing to search" and don't change string when a char is added
  • Keep proposed strategy but wait 1 sec before showing additional hint about the need of a second char. In this case the hint could be simplified as: "Type at least two characters to search"

@artonge artonge force-pushed the artonge/feat/unified_search_add_min_length_setting branch from 12999ed to 1f1591e Compare September 24, 2025 15:08
This setting existed already for the legacy unified search.
This commit expose that setting to the new front-end, and
also ignore non valid requests in the backend.

We also take the opportunity to register the config in the lexicon.

Signed-off-by: Louis Chemineau <[email protected]>
Signed-off-by: Louis Chemineau <[email protected]>
@artonge artonge force-pushed the artonge/feat/unified_search_add_min_length_setting branch from 1f1591e to c8370f3 Compare September 24, 2025 15:53
@artonge artonge merged commit ab4592b into master Sep 25, 2025
234 of 240 checks passed
@artonge artonge deleted the artonge/feat/unified_search_add_min_length_setting branch September 25, 2025 08:43
@backportbot
Copy link

backportbot bot commented Sep 25, 2025

The backport to stable31 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable31
git pull origin stable31

# Create the new backport branch
git checkout -b backport/55259/stable31

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 65d5bf20 fccb13e8 c8370f31

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/55259/stable31

Error: Failed to check for changes with origin/stable31: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot
Copy link

backportbot bot commented Sep 25, 2025

The backport to stable32 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable32
git pull origin stable32

# Create the new backport branch
git checkout -b backport/55259/stable32

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 65d5bf20 fccb13e8 c8370f31

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/55259/stable32

Error: Failed to push branch backport/55259/stable32: remote: {"auth_status":"auth_error","body":"Invalid username or token. Password authentication is not supported for Git operations."}
fatal: Authentication failed for 'https://github.com/nextcloud/server.git/'


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@artonge
Copy link
Contributor Author

artonge commented Sep 25, 2025

/backport fccb13e to stable32

@artonge
Copy link
Contributor Author

artonge commented Sep 25, 2025

/backport fccb13e to stable31

@backportbot
Copy link

backportbot bot commented Sep 25, 2025

The backport to stable32 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable32
git pull origin stable32

# Create the new backport branch
git checkout -b backport/55259/stable32

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick fccb13e8

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/55259/stable32

Error: Failed to push branch backport/55259/stable32: remote: {"auth_status":"auth_error","body":"Invalid username or token. Password authentication is not supported for Git operations."}
fatal: Authentication failed for 'https://github.com/nextcloud/server.git/'


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot
Copy link

backportbot bot commented Sep 25, 2025

The backport to stable31 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable31
git pull origin stable31

# Create the new backport branch
git checkout -b backport/55259/stable31

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick fccb13e8

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/55259/stable31

Error: Failed to check for changes with origin/stable31: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews backport-request bug feature: search javascript php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants