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

Feature/draggable filters in table widget #5886

Merged
merged 15 commits into from
Jul 20, 2021

Conversation

vicky-primathon
Copy link
Contributor

@vicky-primathon vicky-primathon commented Jul 15, 2021

Description

User should be able to drag the filter pane on the table widget anywhere on the canvas, just like how user can do with the property pane.

Fixes #4088
Fixes #5329
Fixes #5332

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Test coverage results 🧪

🟢 Total coverage has increased
// Code coverage diff between base branch:release and head branch: feature/draggable-filters-in-table-widget 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 53.59 (0) 35.36 (0.03) 32.17 (0.05) 54.15 (0.01)
🟢 app/client/src/actions/widgetActions.tsx 83.02 (1.02) 0 (0) 50 (3.33) 77.78 (1.31)
🔴 app/client/src/components/editorComponents/DraggableComponent.tsx 81.97 (-1.08) 58.54 (-3) 73.33 (0) 81.82 (-1.2)
🔴 app/client/src/components/editorComponents/ResizableComponent.tsx 59.14 (-0.2) 22.22 (-0.73) 63.64 (0) 58.24 (-0.19)
🔴 app/client/src/components/editorComponents/WidgetNameComponent/index.tsx 81.13 (-0.5) 63.41 (-5.01) 90 (0) 80.39 (-0.46)
🔴 app/client/src/icons/ControlIcons.tsx 57.28 (-0.3) 100 (0) 12 (-0.5) 57.28 (-0.3)
🟢 app/client/src/pages/Editor/GlobalHotKeys.tsx 71.95 (0.7) 39.13 (0) 61.29 (1.29) 70.51 (0.77)
🔴 app/client/src/pages/Editor/Popper.tsx 85 (0) 71.05 (-1.17) 88.89 (0) 85 (0)
🟢 app/client/src/pages/Editor/WidgetsEditor.tsx 90.63 (0.15) 71.88 (0) 100 (0) 90.16 (0.16)
🟢 app/client/src/pages/Editor/utils.ts 42.39 (0) 44.44 (31.54) 25 (0) 44.19 (0)
🔴 app/client/src/reducers/entityReducers/metaReducer.ts 32.14 (-10.72) 0 (0) 14.29 (-2.38) 32.14 (-10.72)
✨ 🆕 app/client/src/reducers/uiReducers/tableFilterPaneReducer.tsx 28.57 0 50 31.58
🔴 app/client/src/sagas/WidgetOperationSagas.tsx 44.05 (-0.06) 30.72 (0) 49.43 (0) 44.33 (-0.08)
✨ 🆕 app/client/src/selectors/tableFilterSelectors.tsx 100 58.82 100 100
🔴 app/client/src/utils/hooks/dragResizeHooks.tsx 75.93 (-4.07) 22.22 (-17.78) 60 (-1.54) 75 (-3.38)
🟢 app/client/src/utils/hooks/useClickOpenPropPane.tsx 81.82 (0.69) 53.49 (1.11) 100 (0) 80.77 (0.77)

@vicky-primathon
Copy link
Contributor Author

/ok-to-test sha=273523e

@vicky-primathon
Copy link
Contributor Author

/ok-to-test sha=5497db7

1 similar comment
@vicky-primathon
Copy link
Contributor Author

/ok-to-test sha=5497db7

@somangshu somangshu removed their request for review July 16, 2021 06:40
marks0351
marks0351 previously approved these changes Jul 19, 2021
@vicky-primathon
Copy link
Contributor Author

/ok-to-test sha=3114078

@somangshu
Copy link
Contributor

@vicky-primathon please merge latest release here, We have a few fixes available

…o feature/draggable-filters-in-table-widget
@YogeshJayaseelan
Copy link
Contributor

@somangshu @somangshu @vibhandikyash

Verified the fixes and the following issues are working as expected

[Bug] Deploy Preview - Table Widget - Once when the filter is applied again user needs to click on filter icon for using other filter #5329 - Verified
[Bug]Deploy Preview - Table widget - Filter is not accessible unless if the debugger is closed when the filter is dragged and dropped to the bottom #5332 - Verified
Help text overlap - Verified
Not able to select(by clicking on the widget) any other widget when table filter pane is open - Verified
New issue:
5) Filter functionality is not working as expected - ID ends with 1 or First-name ends with e

For the above table data use the following sample api and bind with the table data - https://reqres.in/api/users?page=2

https://loom.com/share/1514c5e725b343c290e65b82cd478f6c

6)Can we have clear button inside the filter pane so that without removing the existing filter user can clear the data

@vicky-primathon
Copy link
Contributor Author

@somangshu @somangshu @vibhandikyash

Verified the fixes and the following issues are working as expected

[Bug] Deploy Preview - Table Widget - Once when the filter is applied again user needs to click on filter icon for using other filter #5329 - Verified
[Bug]Deploy Preview - Table widget - Filter is not accessible unless if the debugger is closed when the filter is dragged and dropped to the bottom #5332 - Verified
Help text overlap - Verified
Not able to select(by clicking on the widget) any other widget when table filter pane is open - Verified
New issue:
5) Filter functionality is not working as expected - ID ends with 1 or First-name ends with e

For the above table data use the following sample api and bind with the table data - https://reqres.in/api/users?page=2

https://loom.com/share/1514c5e725b343c290e65b82cd478f6c

6)Can we have clear button inside the filter pane so that without removing the existing filter user can clear the data

@YogeshJayaseelan Issue 5 is fixed.
@somangshu should we pick the new suggestion on removing the existing filters.

@somangshu
Copy link
Contributor

@vicky-primathon @YogeshJayaseelan while I agree the option to clear all filter is great, I think we should take that up as a separate requirement.

@YogeshJayaseelan please raise an enhancement for this.

Copy link
Contributor

@somangshu somangshu left a comment

Choose a reason for hiding this comment

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

Runnning tests

@YogeshJayaseelan
Copy link
Contributor

@somangshu @vicky-primathon Rested the fixes and they are working as expected.

Issues Fixed:
1,2,3,4,5

Raised Separate Enhancement for 'Clear' option
#5980

@somangshu somangshu merged commit 6f91c1a into release Jul 20, 2021
@somangshu somangshu deleted the feature/draggable-filters-in-table-widget branch July 20, 2021 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment