You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/07/19 21:23:07 UTC
[GitHub] [superset] justinpark opened a new pull request, #20778: feat(dashboard): Make FilterBar width resizable
justinpark opened a new pull request, #20778:
URL: https://github.com/apache/superset/pull/20778
### SUMMARY
The current native filterbar section is fixed size.
Since the filter is not wide enough for moderately wide data to be seen, some filter value with the long overlapped prefix string such like the following case truncated with the repeated strings.
<img width="262" alt="Screen Shot 2022-07-14 at 1 46 21 PM" src="https://user-images.githubusercontent.com/1392866/179846536-fb2484bf-c8c3-4594-ab7b-ce0adbcf2732.png">
There is an HTML tooltip that appear on mouseover but it's slow and bad user experience.
The dropdown needs to be widened over the sidebar but the dropdown also truncated under the sidebar to fix the https://github.com/apache/superset/pull/19399
<img width="348" alt="Screen Shot 2022-07-19 at 2 14 41 PM" src="https://user-images.githubusercontent.com/1392866/179849717-dff01a09-f75e-4bf1-a959-4db3295dca4d.png">
Therefore, this commit makes the sidebar resizable to be widened itself.
This commit adds the Resizable panel for native filterbar to adjust the width wider to help this inconvenient case.
It also stores the adjusted width for individual dashboard in localStorage to memorize the state.
Addition to the feature, this commit also migrates DashboardBuilder test code to testing-library, jest and typescript to enable emotion test helpers.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
https://user-images.githubusercontent.com/1392866/179843448-425ad37d-9a6d-409e-abdc-b78cfa2f4412.mov
After:
https://user-images.githubusercontent.com/1392866/179843423-4effc912-42d3-4811-8d2a-6aeacd7b0d79.mov
### TESTING IN
STRUCTIONS
- Go to dashboard and then open the native filter menu
- hover on the right edge of the menu
- drag to adjust the width
### ADDITIONAL INFORMATION
- [x] Has associated issue:
- [x] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [x] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #20778: feat(dashboard): Make FilterBar width resizable
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #20778:
URL: https://github.com/apache/superset/pull/20778#issuecomment-1189769469
# [Codecov](https://codecov.io/gh/apache/superset/pull/20778?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#20778](https://codecov.io/gh/apache/superset/pull/20778?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b402ec3) into [master](https://codecov.io/gh/apache/superset/commit/ae306d6d1f76d6437e640c649e6a4c4e8b3060cb?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ae306d6) will **decrease** coverage by `0.04%`.
> The diff coverage is `95.45%`.
```diff
@@ Coverage Diff @@
## master #20778 +/- ##
==========================================
- Coverage 66.85% 66.81% -0.05%
==========================================
Files 1753 1754 +1
Lines 65823 65989 +166
Branches 7007 7052 +45
==========================================
+ Hits 44005 44089 +84
- Misses 20032 20099 +67
- Partials 1786 1801 +15
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.94% <95.45%> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/20778?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `59.39% <ø> (ø)` | |
| [...board/components/nativeFilters/FilterBar/index.tsx](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL2luZGV4LnRzeA==) | `60.58% <ø> (ø)` | |
| [superset-frontend/src/utils/localStorageHelpers.ts](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2xvY2FsU3RvcmFnZUhlbHBlcnMudHM=) | `90.00% <ø> (ø)` | |
| [...d/components/DashboardBuilder/DashboardBuilder.tsx](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0Rhc2hib2FyZEJ1aWxkZXIvRGFzaGJvYXJkQnVpbGRlci50c3g=) | `75.00% <87.50%> (+4.89%)` | :arrow_up: |
| [...onents/DashboardBuilder/useStoredFilterBarWidth.ts](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0Rhc2hib2FyZEJ1aWxkZXIvdXNlU3RvcmVkRmlsdGVyQmFyV2lkdGgudHM=) | `100.00% <100.00%> (ø)` | |
| [...ts/nativeFilters/FilterBar/ActionButtons/index.tsx](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0FjdGlvbkJ1dHRvbnMvaW5kZXgudHN4) | `87.50% <100.00%> (+1.78%)` | :arrow_up: |
| [superset-frontend/src/dashboard/constants.ts](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb25zdGFudHMudHM=) | `100.00% <100.00%> (ø)` | |
| [...t-frontend/src/dashboard/containers/SliceAdder.jsx](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL1NsaWNlQWRkZXIuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rontend/src/dashboard/containers/DashboardGrid.jsx](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZEdyaWQuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/featureFlags.ts](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZlYXR1cmVGbGFncy50cw==) | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
| ... and [78 more](https://codecov.io/gh/apache/superset/pull/20778/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] justinpark commented on a diff in pull request #20778: feat(dashboard): Make FilterBar width resizable
Posted by GitBox <gi...@apache.org>.
justinpark commented on code in PR #20778:
URL: https://github.com/apache/superset/pull/20778#discussion_r925841358
##########
superset-frontend/src/dashboard/constants.ts:
##########
@@ -37,6 +37,7 @@ export const PLACEHOLDER_DATASOURCE: Datasource = {
export const MAIN_HEADER_HEIGHT = 53;
export const CLOSED_FILTER_BAR_WIDTH = 32;
export const OPEN_FILTER_BAR_WIDTH = 260;
Review Comment:
I kept this variable because some custom override might be impacted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] ktmud commented on a diff in pull request #20778: feat(dashboard): Make FilterBar width resizable
Posted by GitBox <gi...@apache.org>.
ktmud commented on code in PR #20778:
URL: https://github.com/apache/superset/pull/20778#discussion_r924983359
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx:
##########
@@ -85,6 +86,7 @@ const ActionButtonsContainer = styled.div`
`;
export const ActionButtons = ({
+ width,
Review Comment:
```suggestion
width = OPEN_FILTER_BAR_WIDTH
```
Nit: let's assign a default value as soon as possible
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx:
##########
@@ -103,7 +105,7 @@ export const ActionButtons = ({
);
return (
- <ActionButtonsContainer>
+ <ActionButtonsContainer data-test="filterbar-action-buttons" width={width || OPEN_FILTER_BAR_WIDTH}>
Review Comment:
```suggestion
<ActionButtonsContainer data-test="filterbar-action-buttons" width={width}>
```
No need for `||` is default value is assigned.
##########
superset-frontend/src/dashboard/constants.ts:
##########
@@ -37,6 +37,7 @@ export const PLACEHOLDER_DATASOURCE: Datasource = {
export const MAIN_HEADER_HEIGHT = 53;
export const CLOSED_FILTER_BAR_WIDTH = 32;
export const OPEN_FILTER_BAR_WIDTH = 260;
Review Comment:
Maybe rename this to `OPEN_FILTER_BAR_DEFAULT_WIDTH`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] ktmud commented on a diff in pull request #20778: feat(dashboard): Make FilterBar width resizable
Posted by GitBox <gi...@apache.org>.
ktmud commented on code in PR #20778:
URL: https://github.com/apache/superset/pull/20778#discussion_r924983560
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx:
##########
@@ -103,7 +105,7 @@ export const ActionButtons = ({
);
return (
- <ActionButtonsContainer>
+ <ActionButtonsContainer data-test="filterbar-action-buttons" width={width || OPEN_FILTER_BAR_WIDTH}>
Review Comment:
```suggestion
<ActionButtonsContainer data-test="filterbar-action-buttons" width={width}>
```
No need for `||` if default value is assigned.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] ktmud merged pull request #20778: feat(dashboard): Make FilterBar width resizable
Posted by GitBox <gi...@apache.org>.
ktmud merged PR #20778:
URL: https://github.com/apache/superset/pull/20778
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] ktmud commented on pull request #20778: feat(dashboard): Make FilterBar width resizable
Posted by GitBox <gi...@apache.org>.
ktmud commented on PR #20778:
URL: https://github.com/apache/superset/pull/20778#issuecomment-1189569392
/testenv up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] github-actions[bot] commented on pull request #20778: feat(dashboard): Make FilterBar width resizable
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #20778:
URL: https://github.com/apache/superset/pull/20778#issuecomment-1189569924
@ktmud Container image not yet published for this PR. Please try again when build is complete.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] github-actions[bot] commented on pull request #20778: feat(dashboard): Make FilterBar width resizable
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #20778:
URL: https://github.com/apache/superset/pull/20778#issuecomment-1189569944
@ktmud Ephemeral environment creation failed. Please check the Actions logs for details.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] justinpark commented on a diff in pull request #20778: feat(dashboard): Make FilterBar width resizable
Posted by GitBox <gi...@apache.org>.
justinpark commented on code in PR #20778:
URL: https://github.com/apache/superset/pull/20778#discussion_r924985095
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx:
##########
@@ -85,6 +86,7 @@ const ActionButtonsContainer = styled.div`
`;
export const ActionButtons = ({
+ width,
Review Comment:
sounds good
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org