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

Jbaker/refactor icon sizing #148

Merged

Conversation

jason-capsule42
Copy link
Member

@jason-capsule42 jason-capsule42 commented Oct 28, 2024

Alaska Airlines Pull Request

Type of change:

Please delete options that are not relevant.

  • New capability
  • Revision of an existing capability
  • Infrastructure change (automation, etc.)
  • Other (please elaborate)

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!

-- Auro Design System Team

@jason-capsule42 jason-capsule42 requested a review from a team as a code owner October 28, 2024 14:54
Copy link

sourcery-ai bot commented Oct 28, 2024

Reviewer's Guide by Sourcery

This PR refactors the icon sizing implementation in the auro-icon component, replacing the customSize attribute with a CSS custom property approach. The changes improve the component's flexibility and maintainability by using CSS variables for size control instead of relying on attribute-based styling.

Class diagram for auro-icon component changes

classDiagram
    class AuroIcon {
        - customSize: Boolean
        + --ds-auro-icon-size: CSSVariable
        category: String
        name: String
        customColor: Boolean
    }
    note for AuroIcon "Replaced customSize attribute with --ds-auro-icon-size CSS variable"
Loading

File-Level Changes

Change Details Files
Replaced customSize attribute with CSS custom property for icon sizing
  • Removed customSize boolean attribute from component definition
  • Added --ds-auro-icon-size CSS custom property with default value of --ds-size-300
  • Updated component to use CSS custom property for width and height
  • Removed attribute-based size styling in favor of direct size control
src/auro-icon.js
src/style.scss
src/tokens.scss
Updated documentation to reflect new sizing implementation
  • Updated custom size usage examples with new CSS custom property approach
  • Revised documentation to explain the new sizing mechanism
  • Reorganized theme support section for better readability
demo/api.md
docs/partials/api.md
apiExamples/customSize.html
Enhanced SVG element styling
  • Added explicit width and height styling for SVG elements
  • Ensured square aspect ratio preservation for icons
src/style.scss

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@jason-capsule42 jason-capsule42 linked an issue Oct 28, 2024 that may be closed by this pull request
@jason-capsule42 jason-capsule42 self-assigned this Oct 28, 2024
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @jason-capsule42 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

rmenner
rmenner previously approved these changes Oct 28, 2024
Copy link
Contributor

@rmenner rmenner 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 great. I think I am starting to understand how our theming works.

Copy link
Contributor

@jordanjones243 jordanjones243 left a comment

Choose a reason for hiding this comment

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

Need to run build to update API docs

@jordanjones243 jordanjones243 changed the base branch from master to sunMota/feat/easierRegistry/144 October 28, 2024 17:36
BREAKING CHANGE: the old customSize attribute is no longer supported. See new documentation on API page under Theme Support.
@jordanjones243 jordanjones243 force-pushed the jbaker/refactorIconSizing branch from 0e0c39d to ea82aef Compare October 28, 2024 17:38
@jordanjones243 jordanjones243 merged commit 89056f1 into sunMota/feat/easierRegistry/144 Oct 28, 2024
1 check passed
@jordanjones243 jordanjones243 deleted the jbaker/refactorIconSizing branch October 28, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom Sizing Doesn't Work
3 participants