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

Make the ALL_MESSAGES command work globally #1512

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Jul 18, 2024

  1. refactor: ui_tools/helper: Add new enum Search Status.

    The existing empty_search boolean property of views with search boxes is
    replaced by an enum property search_status that supports the states -
    DEFAULT, FILTERED and EMPTY.
    This allows tracking whether the results are filtered or not as well,
    without introducing a separate boolean property for that.
    
    Updated tests.
    Niloth-p committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    0bf31b7 View commit details
    Browse the repository at this point in the history
  2. views/boxes: Reset search only after verifying search status.

    Added conditional checks to ensure that a search was previously
    performed before resetting search, using the newly added search_status.
    Niloth-p committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    4f15cac View commit details
    Browse the repository at this point in the history
  3. views: Make the ALL_MESSAGES command work globally.

    This command worked only when a message was selected, using it as
    an anchor to fetch messages.
    Now, it has been made consistent with the other narrow commands,
    to work from any panel.
    
    This could not be implemented in ui.py along with other narrow commands,
    because of the conflict caused by the Esc key also being assigned to
    reset search in the side panels (GO_BACK command).
    
    When both operations,
    1. reset search in the current panel view
    2. narrow to all messages
    are possible, pressing `Esc` is set to trigger only
    the reset search operation and not the ALL_MESSAGES command.
    The next keypress of `Esc` will go to the home view once the
    current panel view is restored to its default state.
    
    Fixes zulip#1505.
    Niloth-p committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    2525a79 View commit details
    Browse the repository at this point in the history