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

feat: Keep searching result #26755

Closed

Conversation

puridach-w
Copy link
Contributor

@puridach-w puridach-w commented Jan 23, 2024

SUMMARY

The feature change involves retaining search filter results across SQL Lab tabs by integrating search text into the Redux state.

Under the previous system, users would encounter the resetting of their search results each time they switched to a different SQL Lab tab and back. This process required users to repeatedly enter their search filters, resulting in a disrupted workflow.

This enhancement directly tackles this inconvenience. Upon rendering SQL Lab, it now utilizes the search text stored in Redux state as the filter value. This ensures that no matter how many tabs a user switches between, the search filter results remain persistent, no longer disappearing upon tab switching.

BEFORE SCREENSHOTS OR ANIMATED GIF

Before.-.keep.filtering.mov

AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2567-01-24.at.11.16.31.mov

TESTING INSTRUCTIONS

  • Navigate to the SQLLab page
  • Execute Query
  • Apply a filter on the resulting output table using the search box
  • Navigate to other SQL editor tab
  • Return to the initial SQL editor tab
  • Notice that the previously input search text and filter results are still visible

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@michael-s-molina
Copy link
Member

Hi @puridach-w. Thank you for PR. I'm not sure why the table is re-rendered when you switch tabs but that could be a problem for this feature given that it won't be intuitive for users that the results will be filtered after you run the query again. @justinpark probably has more context why the tabs need to be re-rendered. If the tab was not re-rendered, then maintaining the search state would totally make sense (actually that's what I would expect when switching tabs).

@puridach-w
Copy link
Contributor Author

Video: https://github.com/apache/superset/assets/76474644/780415d6-a42f-4187-81de-02a5c8d89a75
Actually, after switching back to the original tab, it automatically fetches the result table, as shown in the provided video.

@justinpark
Copy link
Member

@puridach-w Thank you for highlighting this issue. As @michael-s-molina has pointed out, the result state should remain constant while switching tabs, making an additional search term state storage unnecessary. I previously drafted a PR (which was reverted because of regression issues) that should address this concern without requiring extra redux logic. I'll provide updates on this PR later.

@puridach-w
Copy link
Contributor Author

Could you clarify more? I'm not quite sure what you're meaning or what the next steps should be.

@john-bodley
Copy link
Member

cc @gaurav7261

@justinpark
Copy link
Member

Could you clarify more? I'm not quite sure what you're meaning or what the next steps should be.

This issue wasn't intended and will be fixed (without your PR) once this PR is merged.

@puridach-w puridach-w changed the title Feat: Keep searching result feat: Keep searching result Jan 30, 2024
@puridach-w
Copy link
Contributor Author

Could you clarify more? I'm not quite sure what you're meaning or what the next steps should be.

This issue wasn't intended and will be fixed (without your PR) once this PR is merged.

I've noticed that the issue was resolved following the merge of the PR you mentioned, so I'll close this PR.

@puridach-w puridach-w closed this Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants