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/03/31 18:14:03 UTC
[GitHub] [superset] diegomedina248 opened a new pull request #19472: fix: Dashboard Edit View Tab Headers Hidden when Dashboard Name is Long
diegomedina248 opened a new pull request #19472:
URL: https://github.com/apache/superset/pull/19472
### SUMMARY
The dashboard edit view get's cut off (hidden behind) when the dashboard header is bigger than usual.
This can happen if the dashboard title occupies more than one line, making the header bigger, or when editing the title.
The reason is because the edit view is sticky, and the top is hardcoded.
This PR calculates the top offset of the edit view based on the dashboard header view, so that it looks correctly regardless of size.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
https://user-images.githubusercontent.com/17252075/161122189-d8bc089e-c9b3-4d51-9f01-bdbd3ec1a4f3.mov
After:
https://user-images.githubusercontent.com/17252075/161121941-3be7dfe7-c6be-4102-9601-b5cc88269916.mov
### TESTING INSTRUCTIONS
1. Create a dashboard
2. In edit mode, edit the dashboard title to be more than one line long
Ensure the edit view tabs are still visible.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] 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
- [ ] 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] Gwitchr commented on a change in pull request #19472: fix: Dashboard Edit View Tab Headers Hidden when Dashboard Name is Long
Posted by GitBox <gi...@apache.org>.
Gwitchr commented on a change in pull request #19472:
URL: https://github.com/apache/superset/pull/19472#discussion_r839898622
##########
File path: superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
##########
@@ -261,10 +260,26 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
uiConfig.hideTitle ||
standaloneMode === DashboardStandaloneMode.HIDE_NAV_AND_TITLE ||
isReport;
+ const [barTopOffset, setBarTopOffset] = useState(0);
- const barTopOffset =
- (hideDashboardHeader ? 0 : HEADER_HEIGHT) +
- (topLevelTabs ? TABS_HEIGHT : 0);
+ useEffect(() => {
+ setBarTopOffset(headerRef.current?.getBoundingClientRect()?.height || 0);
+
+ let observer: ResizeObserver;
+ if (typeof global.ResizeObserver !== 'undefined' && headerRef.current) {
+ observer = new ResizeObserver(entries => {
+ setBarTopOffset(
+ current => entries?.[0]?.contentRect?.height || current,
+ );
+ });
+
+ observer.observe(headerRef.current);
+ }
+
+ return () => {
+ observer?.disconnect();
+ };
+ }, []);
Review comment:
Nice solution!
--
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 #19472: fix: Dashboard Edit View Tab Headers Hidden when Dashboard Name is Long
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #19472:
URL: https://github.com/apache/superset/pull/19472#issuecomment-1084992923
# [Codecov](https://codecov.io/gh/apache/superset/pull/19472?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 [#19472](https://codecov.io/gh/apache/superset/pull/19472?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fc4ef83) into [master](https://codecov.io/gh/apache/superset/commit/816a2c3e1e9fb1cc82923f8c0948267697c1d234?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (816a2c3) will **decrease** coverage by `0.06%`.
> The diff coverage is `63.63%`.
```diff
@@ Coverage Diff @@
## master #19472 +/- ##
==========================================
- Coverage 66.48% 66.42% -0.07%
==========================================
Files 1670 1673 +3
Lines 63968 64055 +87
Branches 6512 6519 +7
==========================================
+ Hits 42531 42547 +16
- Misses 19748 19817 +69
- Partials 1689 1691 +2
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.23% <63.63%> (-0.09%)` | :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/19472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [superset-frontend/src/dashboard/constants.ts](https://codecov.io/gh/apache/superset/pull/19472/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% <ø> (ø)` | |
| [...d/components/DashboardBuilder/DashboardBuilder.tsx](https://codecov.io/gh/apache/superset/pull/19472/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=) | `72.09% <63.63%> (-0.64%)` | :arrow_down: |
| [.../components/Header/HeaderActionsDropdown/index.jsx](https://codecov.io/gh/apache/superset/pull/19472/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9IZWFkZXJBY3Rpb25zRHJvcGRvd24vaW5kZXguanN4) | `67.79% <0.00%> (-3.64%)` | :arrow_down: |
| [...ontend/src/dashboard/components/dnd/DragHandle.tsx](https://codecov.io/gh/apache/superset/pull/19472/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2RuZC9EcmFnSGFuZGxlLnRzeA==) | `83.33% <0.00%> (-2.39%)` | :arrow_down: |
| [...atasourcePanel/DatasourcePanelDragOption/index.tsx](https://codecov.io/gh/apache/superset/pull/19472/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhc291cmNlUGFuZWwvRGF0YXNvdXJjZVBhbmVsRHJhZ09wdGlvbi9pbmRleC50c3g=) | `88.88% <0.00%> (-1.12%)` | :arrow_down: |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/19472/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=) | `60.92% <0.00%> (-0.46%)` | :arrow_down: |
| [...d/src/explore/components/DatasourcePanel/index.tsx](https://codecov.io/gh/apache/superset/pull/19472/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhc291cmNlUGFuZWwvaW5kZXgudHN4) | `69.23% <0.00%> (-0.13%)` | :arrow_down: |
| [superset-frontend/src/preamble.ts](https://codecov.io/gh/apache/superset/pull/19472/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ByZWFtYmxlLnRz) | `0.00% <0.00%> (ø)` | |
| [superset-frontend/src/embedded/index.tsx](https://codecov.io/gh/apache/superset/pull/19472/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2VtYmVkZGVkL2luZGV4LnRzeA==) | `0.00% <0.00%> (ø)` | |
| [...plugins/legacy-plugin-chart-heatmap/src/Heatmap.js](https://codecov.io/gh/apache/superset/pull/19472/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWhlYXRtYXAvc3JjL0hlYXRtYXAuanM=) | `0.00% <0.00%> (ø)` | |
| ... and [15 more](https://codecov.io/gh/apache/superset/pull/19472/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19472?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19472?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [816a2c3...fc4ef83](https://codecov.io/gh/apache/superset/pull/19472?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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