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: added text and changed margins #12923

Merged
merged 9 commits into from
Feb 8, 2021
Merged

Conversation

AAfghahi
Copy link
Member

@AAfghahi AAfghahi commented Feb 3, 2021

SUMMARY

Also changed the form-group to have margin 8px for all form groups.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image

TEST PLAN

ADDITIONAL INFORMATION

@AAfghahi AAfghahi changed the title added text and changed margins fix: added text and changed margins Feb 3, 2021
@codecov-io
Copy link

codecov-io commented Feb 3, 2021

Codecov Report

Merging #12923 (3c9c4b6) into master (3235d91) will decrease coverage by 16.82%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #12923       +/-   ##
===========================================
- Coverage   69.79%   52.97%   -16.83%     
===========================================
  Files        1026      480      -546     
  Lines       48865    17315    -31550     
  Branches     5261     4485      -776     
===========================================
- Hits        34106     9172    -24934     
+ Misses      14634     8143     -6491     
+ Partials      125        0      -125     
Flag Coverage Δ
cypress 52.97% <ø> (-0.01%) ⬇️
javascript ?
python ?

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

Impacted Files Coverage Δ
...uperset-frontend/src/dashboard/util/dnd-reorder.js 0.00% <0.00%> (-100.00%) ⬇️
...rset-frontend/src/dashboard/util/getEmptyLayout.js 0.00% <0.00%> (-100.00%) ⬇️
...dashboard/components/resizable/ResizableHandle.jsx 0.00% <0.00%> (-100.00%) ⬇️
...dashboard/components/nativeFilters/ScopingTree.tsx 6.25% <0.00%> (-93.75%) ⬇️
.../src/dashboard/util/getFilterScopeFromNodesTree.js 0.00% <0.00%> (-93.48%) ⬇️
...set-frontend/src/views/CRUD/alert/ExecutionLog.tsx 11.76% <0.00%> (-88.24%) ⬇️
...src/dashboard/components/gridComponents/Header.jsx 10.52% <0.00%> (-86.85%) ⬇️
superset-frontend/src/components/IconTooltip.tsx 13.33% <0.00%> (-86.67%) ⬇️
...rc/dashboard/components/gridComponents/Divider.jsx 13.33% <0.00%> (-86.67%) ⬇️
...perset-frontend/src/views/CRUD/welcome/Welcome.tsx 2.94% <0.00%> (-85.95%) ⬇️
... and 882 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3235d91...3c9c4b6. Read the comment docs.

@@ -220,7 +220,7 @@
);

// ** `.form-group` margin
@form-group-margin-bottom: 16px;
@form-group-margin-bottom: 8px;
Copy link
Member

@eschutho eschutho Feb 3, 2021

Choose a reason for hiding this comment

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

we're going to be removing the .less styling, and also so that we don't change things too globally, you can instead add some styling for this selector with the emotion styles in DatasourceEditor.jsx under const DatasourceContainer = styled.div

Copy link
Member Author

Choose a reason for hiding this comment

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

Hello, I was also uncomfortable changing this, since it is a global change. In the ticket, Stephen mentioned that he wanted the change for all form groups. So I thought that it might be for everything. Relooking at it, he might have meant for all of the form groups on this page however.

Will go back and change it using emotion styles instead. It will be a good opportunity to work with emotion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry for taking so long, Beto was going through the backend architecture. I just made this change.

@yousoph
Copy link
Member

yousoph commented Feb 4, 2021

I think the margins above the titles should stay at what they were before (16px?) and just the margin between the input field and the help text should be 8px, but @Steejay can confirm!

@Steejay
Copy link

Steejay commented Feb 4, 2021

I think the margins above the titles should stay at what they were before (16px?) and just the margin between the input field and the help text should be 8px, but @Steejay can confirm!

Yes confirmed cc @yousoph @AAfghahi

@Steejay
Copy link

Steejay commented Feb 4, 2021

@AAfghahi sorry about the miscommunication. shouldve been more clear here. i was referring to the form groups on this page.

@AAfghahi
Copy link
Member Author

AAfghahi commented Feb 4, 2021 via email

@@ -51,13 +51,17 @@ import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';

const DatasourceContainer = styled.div`
.change-warning {
margin: 16px 10px 0;
margin: 16px 10px 0x;
Copy link
Member

Choose a reason for hiding this comment

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

was this change intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, and I noticed that there was one test that I failed, and maybe this is why. Thank you for noticing this.

@eschutho
Copy link
Member

eschutho commented Feb 4, 2021

@AAfghahi can you repaste the new screenshots? looks like they're not showing up. thanks!

@AAfghahi
Copy link
Member Author

AAfghahi commented Feb 4, 2021

Sorry about the screenshots, I replied via email, and that does not add them.

image

image


.help-block {
margin-top: 8px;
}
Copy link
Member

Choose a reason for hiding this comment

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

when I render this, I still see the margin-bottom of the form-group, so it's still making a total of 16px.
This is a bit tricky actually. I read this as

form-group should always have a margin bottom of 8px
when there are two siblings (form-group followed by a form-group), then the second one should have a margin-top of 16px.

I think if you go that way, you won't need to add anything additional to the help-block.
lmk if that helps

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah that helps a lot, it really cleared up my thinking about it. I also ended up reading more about how margin works. I ended up trying something else, because nothing I was reading was helping me find a way of implementing your solution.

I ended up targeting the specific form group that is above each help block (form-group-md). I changed the margin-bottom of these to be 8px. However, in order to make sure that 'Extra' and 'Owners' section had a help block with a margin of 8px, I also added a margin-top to the help-block.

Originally I thought that a margin-bottom of 8 and a margin-top of 8 on two elements would make 16px, but they don't actually add the way that I thought they might. It simple goes to the highest margin value. Which is cool.

It looks like this now:
image

The margin between form groups is 16px:
image

The margin between help-block and form-group is 8px:
image

Copy link
Member

Choose a reason for hiding this comment

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

This look great. One other thing I was hinting at was sibling selectors: when there are two siblings (form-group followed by a form-group), then the second one should have a margin-top of 16px. So that would be .form-group + .form-group but it looks like you made it work this way, too.

@pull-request-size pull-request-size bot added size/S and removed size/XS labels Feb 5, 2021
@hughhhh hughhhh closed this Feb 8, 2021
@hughhhh hughhhh reopened this Feb 8, 2021
@hughhhh hughhhh merged commit 69b0ed6 into apache:master Feb 8, 2021
@hughhhh hughhhh deleted the update-text branch February 8, 2021 22:26
amitmiran137 pushed a commit to simcha90/incubator-superset that referenced this pull request Feb 10, 2021
* master:
  fix: UI toast typo (apache#13026)
  feat(db engines): add support for Opendistro Elasticsearch (AWS ES) (apache#12602)
  fix(build): black failing on master, add to required checks (apache#13039)
  fix: time filter db migration optimization (apache#13015)
  fix: untranslated text content of Dashboard page (apache#13024)
  fix(ci): remove signature requirements for commits to master (apache#13034)
  fix: add alerts and report to default config (apache#12999)
  docs(changelog): add entries for 1.0.1 (apache#12981)
  ci: skip cypress if no code changes (apache#12982)
  chore: add cypress required checks for branch protection (apache#12970)
  Refresh dashboard list after bulk delete (apache#12945)
  Updates storybook to version 6.1.17 (apache#13014)
  feat: Save datapanel state in local storage (apache#12996)
  fix: added text and changed margins (apache#12923)
  chore: Swap Slack Url 2 more places (apache#13004)
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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 preset-io size/S 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants