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

fix: Custom SQL filter control #29260

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

michael-s-molina
Copy link
Member

@michael-s-molina michael-s-molina commented Jun 14, 2024

SUMMARY

This PR fixes a number of problems with the Custom SQL filter control:

  • There was a layout flick when changing the clause type
  • The algorithm that detects if something changes was not considering the filter clause. This was blocking users from changing only the filter clause (not the SQL) and saving the filter.
  • There were invalid values for the clause select which was leading to wrong behavior. The Where clause was actually being applied as HAVING. This bug was introduced in chore: make TS enums strictly PascalCase #26875.

This PR also reimplements the tests using RTL and creates a helper function to interact with the Select component in tests.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2024-06-14.at.13.13.32.mov
Screen.Recording.2024-06-14.at.09.41.17.mov

TESTING INSTRUCTIONS

Check the videos for instructions.

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

@dosubot dosubot bot added explore:filter Related to filters in Explore frontend:refactor Related to refactoring the frontend labels Jun 14, 2024
@@ -95,11 +90,6 @@ export default class AdhocFilterEditPopoverSqlTabContent extends Component {
render() {
const { adhocFilter, height, options } = this.props;

const clauseSelectProps = {
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved to the component declaration.

Copy link
Member

@justinpark justinpark left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the RTL migration too

@john-bodley john-bodley added v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch review:checkpoint Last PR reviewed during the daily review standup labels Jun 14, 2024
@john-bodley john-bodley merged commit 16c4497 into apache:master Jun 14, 2024
48 of 49 checks passed
@john-bodley john-bodley removed the review:checkpoint Last PR reviewed during the daily review standup label Jun 17, 2024
@mistercrunch mistercrunch added 🍒 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 24, 2024
eschutho pushed a commit that referenced this pull request Jul 24, 2024
irublev pushed a commit to HighviewPower/superset that referenced this pull request Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels explore:filter Related to filters in Explore frontend:refactor Related to refactoring the frontend size/L v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 4.0.2 🚢 4.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants