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

chore: make control panel sub sections look better #24736

Merged
merged 9 commits into from
Jul 20, 2023

Conversation

mistercrunch
Copy link
Member

SUMMARY

Improving the control panel section to make the hierarchy around the subsection look more clear. Currently it's unclear what is a section/sub-section/header. Bolding and adding an <hr/> as suggested by @kasiazjc helps quite a bit

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

Screen Shot 2023-07-18 at 2 57 48 PM

after

Screen Shot 2023-07-18 at 2 54 50 PM

@@ -18,6 +18,8 @@
*/
import React from 'react';
import { t, RollingType, ComparisonType } from '@superset-ui/core';

Copy link
Member

Choose a reason for hiding this comment

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

The linter will likely whine about this extra line break, I would think.

Copy link
Member Author

Choose a reason for hiding this comment

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

it didn't, in python I like to add line breaks in-between external packages and local imports

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM!

@michael-s-molina
Copy link
Member

@kasiazjc @mistercrunch Could we try something that does not include the <hr>? For me, these additional lines kind of conflict with the collapsible panel lines. Maybe keep the bold and improve spacing?

@kasiazjc
Copy link
Contributor

kasiazjc commented Jul 19, 2023

@kasiazjc @mistercrunch Could we try something that does not include the <hr>? For me, these additional lines kind of conflict with the collapsible panel lines. Maybe keep the bold and improve spacing?

@michael-s-molina I know that it's not perfect, but the line is a temp solution until we get rid of the upper case in labels (and in general in the app). With the current implementation and the number of different components and font sizes it's not easy to define a clear and easy hierarchy (we have to work with 12px font size too, because 14 is too big and overpowers the whole control panel). We had a version with line and without a line, and it seems for now the line makes the most sense (from the feedback I got), but curious to hear your opinion. Side by side mocks below:
image
image
note - there is one thing that needs to be changed in the current implementation - the color of the text in the subheader to #666666, because black is overpowering

What is the perfect case scenario is this version - labels are sentence case and there is no line below subheader, but it's sadly not something that we can take up right now
image

@michael-s-molina
Copy link
Member

Thank you for the context @kasiazjc. I think that because of the uppercase limitation, neither solution is able to clearly define the information hierarchy at this point. I personally prefer the version without additional lines because it has less visual overload and it's more clear which items will be collapsed when I click on the collapse panel arrows. It's not a blocker for me though given that the solution to this problem lies in SIP-82.

@john-bodley
Copy link
Member

john-bodley commented Jul 19, 2023

+1 on @michael-s-molina's #24736 (comment). I don't disagree that the UX could be improved (see SIP-82 for details) but I'm not sure the proposal outlined in this PR actually makes things clearer. Actuality I think it makes things more convoluted (due to the additional of more lines).

Granted there's a margin around the horizontal lines, but I could perceive users being confused around the chevron behavior, i.e., for

Screenshot 2023-07-19 at 12 07 43 PM

it's not overly apparent (without really focusing on the elements) what will be collapsed when one would close the Advanced analytics section.

@kasiazjc
Copy link
Contributor

+1 on @michael-s-molina's #24736 (comment). I don't disagree that the UX could be improved (see SIP-82 for details) but I'm not sure the proposal outlined in this PR actually makes things clearer. Actuality I think it makes things more convoluted (due to the additional of more lines).

Granted there's a margin around the horizontal lines, but I could perceive users being confused around the chevron behavior, i.e., for

Screenshot 2023-07-19 at 12 07 43 PM it's not overly apparent (without really focusing on the elements) what will be collapsed when one would close the `Advanced analytics` section.

Thanks for feedback @john-bodley!

I hear you and @michael-s-molina and can see how the line could be confusing + it's cluttering control panel more. To be honest, internally, I've heard feedback both ways - as the hierarchy and typography is not perfect, in the end settled on this solution to try to make the subheader stand out more.

Saying that, from my perspective - I think in this iteration we can get rid of the line and keep the font weight, color + spacings, as this already is a big improvement. Hopefully we will get to the next phase soon and get rid of the upper case labels, so that the control panel will be less cluttered

@mistercrunch
Copy link
Member Author

mistercrunch commented Jul 19, 2023

ok, killing the <hr/> for now. If I can get this merge I'd like to follow with a de-uppercasing form labels.

@mistercrunch
Copy link
Member Author

mistercrunch commented Jul 19, 2023

Looks pretty clean to me just like that ->

Screen Shot 2023-07-19 at 3 04 59 PM

@mistercrunch
Copy link
Member Author

building on this PR is this one -> preset-io#583

mistercrunch added a commit to preset-io/superset that referenced this pull request Jul 19, 2023
Recent design proposals point towards removing the uppercase usage
across the board, and this PR starts the process with form labels.

it builds upon apache#24736 that
started to address hierarchy-is-unclear issue in Explore control panel
and makes things a bit neater on top of it.
@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Merging #24736 (7beb901) into master (7675e0d) will decrease coverage by 0.01%.
The diff coverage is 25.00%.

❗ Current head 7beb901 differs from pull request most recent head 494b9e8. Consider uploading reports for the commit 494b9e8 to get more accurate results

@@            Coverage Diff             @@
##           master   #24736      +/-   ##
==========================================
- Coverage   68.94%   68.94%   -0.01%     
==========================================
  Files        1901     1902       +1     
  Lines       73898    73902       +4     
  Branches     8175     8175              
==========================================
+ Hits        50951    50952       +1     
- Misses      20834    20837       +3     
  Partials     2113     2113              
Flag Coverage Δ
javascript 55.77% <25.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...d/packages/superset-ui-chart-controls/src/index.ts 100.00% <ø> (ø)
...-chart-controls/src/sections/advancedAnalytics.tsx 14.28% <ø> (ø)
...rset-ui-chart-controls/src/sections/chartTitle.tsx 100.00% <ø> (ø)
...legacy-plugin-chart-partition/src/controlPanel.tsx 25.00% <ø> (ø)
...gins/legacy-plugin-chart-rose/src/controlPanel.tsx 50.00% <ø> (ø)
...gins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx 100.00% <ø> (ø)
.../BigNumber/BigNumberWithTrendline/controlPanel.tsx 16.66% <ø> (ø)
...s/plugin-chart-echarts/src/Funnel/controlPanel.tsx 66.66% <ø> (ø)
...ns/plugin-chart-echarts/src/Gauge/controlPanel.tsx 66.66% <ø> (ø)
...ns/plugin-chart-echarts/src/Graph/controlPanel.tsx 21.42% <ø> (ø)
... and 15 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mistercrunch mistercrunch merged commit 22a0fe5 into apache:master Jul 20, 2023
26 checks passed
@michael-s-molina michael-s-molina added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Jul 21, 2023
michael-s-molina pushed a commit that referenced this pull request Jul 26, 2023
@mistercrunch mistercrunch added 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 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 size/L v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants