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: Add height/width TrashIcon SVG(18px/18px)-Edit Dataset modal #14956

Merged
merged 8 commits into from
Jun 18, 2021

Conversation

andrewbastian
Copy link
Contributor

@andrewbastian andrewbastian commented Jun 2, 2021

SUMMARY

Added fontSize: '18px'; to Trash Icons on Edit Dataset modal's 3 tabs which use this Icon. - metrics, columns, and calculated columns.

This was done inline to the SVG component via the CSS parameter. Also removed iconSize='m' parameter from Icon.Trash component.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:

AFTER

Screen Shot 2021-06-08 at 10 59 57 AM

Screen Shot 2021-06-08 at 10 59 57 AM

UNCHANGED TRASH ICONS

Screen Shot 2021-06-08 at 11 01 18 AM

Screen Shot 2021-06-08 at 11 01 41 AM

TESTING INSTRUCTIONS

Attached above are screenshots of developer-tools showing the changes made. The layout box model shows that the height and width of the Trash SVG are set to 18px.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

@hughhhh hughhhh changed the title Add min-height/width TrashIcon SVG(18px/18px)-Edit Dataset modal chore: Add min-height/width TrashIcon SVG(18px/18px)-Edit Dataset modal Jun 2, 2021
@codecov
Copy link

codecov bot commented Jun 2, 2021

Codecov Report

Merging #14956 (e7f9d62) into master (e82433e) will decrease coverage by 0.53%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14956      +/-   ##
==========================================
- Coverage   77.78%   77.25%   -0.54%     
==========================================
  Files         966      969       +3     
  Lines       49629    49966     +337     
  Branches     6314     6432     +118     
==========================================
- Hits        38606    38600       -6     
- Misses      10822    11161     +339     
- Partials      201      205       +4     
Flag Coverage Δ
hive ?
javascript 72.22% <100.00%> (-0.57%) ⬇️
presto ?

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

Impacted Files Coverage Δ
superset-frontend/src/CRUD/CollectionTable.tsx 78.91% <100.00%> (-6.93%) ⬇️
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
...trols/DateFilterControl/components/CommonFrame.tsx 41.66% <0.00%> (-50.00%) ⬇️
...et-frontend/src/dashboard/actions/nativeFilters.ts 50.84% <0.00%> (-31.85%) ⬇️
...nd/src/dashboard/components/nativeFilters/utils.ts 56.25% <0.00%> (-30.00%) ⬇️
...nents/nativeFilters/FilterBar/FilterSets/index.tsx 47.00% <0.00%> (-30.00%) ⬇️
...nd/src/dashboard/components/nativeFilters/state.ts 75.00% <0.00%> (-25.00%) ⬇️
...t-frontend/src/dashboard/reducers/nativeFilters.ts 60.00% <0.00%> (-24.62%) ⬇️
superset/db_engine_specs/hive.py 70.32% <0.00%> (-17.08%) ⬇️
...components/DashboardBuilder/DashboardContainer.tsx 82.97% <0.00%> (-17.03%) ⬇️
... and 78 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 e82433e...e7f9d62. Read the comment docs.

@andrewbastian andrewbastian marked this pull request as draft June 2, 2021 21:37
@andrewbastian andrewbastian changed the title chore: Add min-height/width TrashIcon SVG(18px/18px)-Edit Dataset modal chore: Add height/width TrashIcon SVG(18px/18px)-Edit Dataset modal Jun 8, 2021
@andrewbastian andrewbastian marked this pull request as ready for review June 8, 2021 18:27
@@ -261,7 +261,7 @@ export default class CRUDCollection extends React.PureComponent<
aria-label="Delete item"
className="pointer"
data-test="crud-delete-icon"
iconSize="m"
css={{fontSize:"18px"}}
Copy link
Member

Choose a reason for hiding this comment

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

Can you try using style instead of css here? I think that's probably the best way to change this, check out this article.

Copy link
Member

@AAfghahi AAfghahi Jun 9, 2021

Choose a reason for hiding this comment

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

The other thing you could try is to change iconSize to "s".

Copy link
Contributor Author

@andrewbastian andrewbastian Jun 9, 2021

Choose a reason for hiding this comment

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

Thanks, @lyndsiWilliams and @AAfghahi! I Changed css to style. Based on the article you linked, Lyndsi, it looks like I was on the right track with using fontSize. I did try setting iconSize="l", but that only brought the icon up to 16px*16px and the ticket said 18px*18px.

Copy link
Member

Choose a reason for hiding this comment

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

Perfect, this looks great!

Copy link
Member

@AAfghahi AAfghahi left a comment

Choose a reason for hiding this comment

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

This looks good! Thank you!

small nit: did you try it with iconSize="s"?

@andrewbastian
Copy link
Contributor Author

This looks good! Thank you!

small nit: did you try it with iconSize="s"?

I did try that on the <Icon.Trash>, but it made the icon smaller. Am I missing something?

@AAfghahi
Copy link
Member

AAfghahi commented Jun 9, 2021

This looks good! Thank you!
small nit: did you try it with iconSize="s"?

I did try that on the <Icon.Trash>, but it made the icon smaller. Am I missing something?

hmm, it might be fontSize 12. In which case this is probably the ideal solution.

Copy link
Member

@lyndsiWilliams lyndsiWilliams left a comment

Choose a reason for hiding this comment

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

Looks good to me! 😁

@AAfghahi
Copy link
Member

@andrewbastian LGTM! @eschutho could you run the workflow for this one?

@@ -261,7 +261,7 @@ export default class CRUDCollection extends React.PureComponent<
aria-label="Delete item"
className="pointer"
data-test="crud-delete-icon"
iconSize="m"
style={{fontSize: '18px'}}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
style={{fontSize: '18px'}}
style={{fontSize: '18px' }}

Copy link
Member

Choose a reason for hiding this comment

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

can we change this to use the css prop instead of style? That's a pattern we've been trying to follow. Thanks!

@eschutho
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@eschutho Ephemeral environment spinning up at http://35.166.235.161:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@eschutho
Copy link
Member

visual testing looks good 👍 Thanks @andrewbastian!

@eschutho eschutho merged commit 2cf9946 into apache:master Jun 18, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
…pache#14956)

* Add min-height/width TrashIcon SVG(18px/18px)-Edit Dataset modal

* Reworked styling to be inline on SVG component via CSS from `emotion`

* Changed parameter from `css` to 'style'

* Fixed lint error.

* Changed `style` back to `css`

Co-authored-by: andrewbastian <andrewbastian@hosaka-deck.lan>
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
…pache#14956)

* Add min-height/width TrashIcon SVG(18px/18px)-Edit Dataset modal

* Reworked styling to be inline on SVG component via CSS from `emotion`

* Changed parameter from `css` to 'style'

* Fixed lint error.

* Changed `style` back to `css`

Co-authored-by: andrewbastian <andrewbastian@hosaka-deck.lan>
@eschutho eschutho added the Superset-Community-Partners Preset community partner program participants label Jan 5, 2022
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
…pache#14956)

* Add min-height/width TrashIcon SVG(18px/18px)-Edit Dataset modal

* Reworked styling to be inline on SVG component via CSS from `emotion`

* Changed parameter from `css` to 'style'

* Fixed lint error.

* Changed `style` back to `css`

Co-authored-by: andrewbastian <andrewbastian@hosaka-deck.lan>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.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 size/XS Superset-Community-Partners Preset community partner program participants 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants