-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add non-semantic header option #141
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request introduces a new "level=\"none\"" option for the Class diagram for AuroHeader component changesclassDiagram
class AuroHeader {
+String level
+String display
+String color
+String margin
+String size
-get spacingClasses()
+render()
}
note for AuroHeader "level attribute now supports 'none'"
note for AuroHeader "spacingClasses replaces spacingDecision and spacingApplied"
State diagram for header element renderingstateDiagram-v2
[*] --> CheckLevel
CheckLevel --> Span: level='none'
CheckLevel --> H1: level='1' or default
CheckLevel --> H2: level='2'
CheckLevel --> H3: level='3'
CheckLevel --> H4: level='4'
CheckLevel --> H5: level='5'
CheckLevel --> H6: level='6'
Span --> ApplyStyles
H1 --> ApplyStyles
H2 --> ApplyStyles
H3 --> ApplyStyles
H4 --> ApplyStyles
H5 --> ApplyStyles
H6 --> ApplyStyles
ApplyStyles --> [*]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Surge demo deployment failed! 😭 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @blackfalcon - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Attempted to compare PR to BETA, but BETA is very out of date and I was unable to fix the branch. |
d639fc9
to
89e704f
Compare
This commit removes overly verbose simple functions and replaces them with an easier to maintain getter method to generate the necessary CSS strings that are applied to the DOM element. Additionally the template switch statements have been refactored to remove duplicate code and simplify maintenance. On branch dsande/nonsemanticheader Changes to be committed: modified: src/auro-header.js
This commit will add functional support for allowing users to easily generate a visual header without the semantic context. On branch dsande/nonsemanticheader Your branch is up to date with 'origin/dsande/nonsemanticheader'. Changes to be committed: modified: src/auro-header.js
Changes to be committed: modified: test/auro-header.test.js
89e704f
to
b4722b7
Compare
Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Resolves: #140
Summary:
New Feature:
level="none"
attribute, rendering a<span>
instead of a heading element (<h1>
-<h6>
). Default remains<h1>
.Refactored Spacing Logic:
spacingDecision
andspacingApplied
methods into a singlespacingClasses
getter for simplicity and reduced redundancy.Template Simplification:
spacingStyles
andcolorStyles
) for cleaner template rendering.Test Additions:
level="none"
correctly renders a<span>
element.Type of change:
Please delete options that are not relevant.
Checklist:
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
Summary by Sourcery
Add support for non-semantic header elements. Refactor spacing and color logic for cleaner template rendering.
New Features:
<auro-header>
to render as a<span>
element usinglevel="none"
.Tests: