-
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
Beta tech debt #129
Beta tech debt #129
Conversation
BREAKING CHANGE: trigger major release for color theme support #121
Reviewer's Guide by SourceryThis pull request focuses on technical debt reduction and improvements in the Auro Flight component. The changes include updating dependencies, refactoring code for better maintainability, and improving version management. Sequence diagram for registerComponent functionsequenceDiagram
participant RuntimeUtils
participant AuroFlight
RuntimeUtils->>AuroFlight: registerComponent('custom-flight', AuroFlight)
Class diagram for AuroFlight and AuroFlightMainclassDiagram
class AuroFlight {
+AuroLibraryRuntimeUtils runtimeUtils
+firstUpdated()
}
class AuroFlightMain {
+AuroDependencyVersioning versioning
+String datetimeTag
}
AuroFlightMain --> AuroDependencyVersioning
AuroFlight --> AuroLibraryRuntimeUtils
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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 @jordanjones243 - I've reviewed your changes - here's some feedback:
Overall Comments:
- The removal of color definitions for labels in settings.yml seems unusual. Could you provide the reasoning behind this change?
- The change of the 'arrivalTime' attribute to 'da' in auro-flight-main.js might break existing implementations. Is this intentional, and if so, how will backward compatibility be maintained?
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 2 issues 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.
console.log("this:", el.shadowRoot.querySelector('.departureTime')); | ||
|
||
await expect(el.shadowRoot.querySelector('.departureTime').querySelector('[auro-datetime]').getAttribute('setDate')).to.equal('2022-05-04T00:30:00-07:00'); | ||
await expect(el.shadowRoot.querySelector('.arrivalTime').querySelector('[auro-datetime]').getAttribute('setDate')).to.equal('2022-05-04T11:55:00-04:00'); |
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.
suggestion (testing): Update test selectors to match new dynamic datetime tag implementation
The test has been updated to use attribute selectors instead of element selectors for the datetime component. This change aligns with the new dynamic tag generation in the component. However, we should consider adding more test cases to ensure the dynamic tag generation works correctly for different versions.
await expect(el.shadowRoot.querySelector('.arrivalTime').querySelector('[auro-datetime]').getAttribute('setDate')).to.equal('2022-05-04T11:55:00-04:00'); | |
<auro-flight-main departureTime="2022-05-04T00:30:00-07:00" departureStation="SEA" arrivalTime="2022-05-04T11:55:00-04:00" arrivalStation="PVD" flights='["AS 1436"]' reroutedArrivalStation="SFO" reroutedDepartureStation="LAX"></auro-flight-main> | |
`); | |
await expect(el.shadowRoot.querySelector('.departureTime [auro-datetime]').getAttribute('setDate')).to.equal('2022-05-04T00:30:00-07:00'); | |
await expect(el.shadowRoot.querySelector('.arrivalTime [auro-datetime]').getAttribute('setDate')).to.equal('2022-05-04T11:55:00-04:00'); | |
// Additional test for dynamic tag generation | |
await expect(el.shadowRoot.querySelector('.departureTime [auro-datetime]').tagName.toLowerCase()).to.match(/^auro-datetime(-[\d.]+)?$/); | |
await expect(el.shadowRoot.querySelector('.arrivalTime [auro-datetime]').tagName.toLowerCase()).to.match(/^auro-datetime(-[\d.]+)?$/); |
console.log("this:", el.shadowRoot.querySelector('.departureTime')); | ||
|
||
await expect(el.shadowRoot.querySelector('.departureTime').querySelector('[auro-datetime]').getAttribute('setDate')).to.equal('2022-05-04T00:30:00-07:00'); | ||
await expect(el.shadowRoot.querySelector('.arrivalTime').querySelector('[auro-datetime]').getAttribute('setDate')).to.equal('2022-05-04T11:55:00-04:00'); | ||
await expect(el.shadowRoot.querySelector('.departureStation').textContent.trim()).to.contain('SEA'); | ||
await expect(el.shadowRoot.querySelector('.arrivalStation').textContent.trim()).to.contain('PVD'); | ||
}); |
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.
suggestion (testing): Add tests for new functionality
The PR introduces new functionality such as dynamic tag generation and handling of component tag renaming. Consider adding new test cases to cover these changes, ensuring that the new features work as expected.
});
it('should dynamically generate tags based on component properties', async () => {
const el = await fixture(html`<auro-flight-main></auro-flight-main>`);
el.tagName = 'custom-tag';
await el.updateComplete;
expect(el.shadowRoot.querySelector('custom-tag')).to.exist;
});
it('should handle component tag renaming correctly', async () => {
const el = await fixture(html`<auro-flight-main></auro-flight-main>`);
el.tagName = 'new-tag';
await el.updateComplete;
expect(el.shadowRoot.querySelector('new-tag')).to.exist;
expect(el.shadowRoot.querySelector('auro-flight-main')).to.not.exist;
});
🎉 This PR is included in version 3.0.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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: # (issue, if applicable)
Summary:
Please summarize the scope of the changes you have submitted, what the intent of the work is and anything that describes the before/after state of the project.
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
Refactor the component registration and dependency management for the auro-flight component, introduce a versioning system for auro-datetime, update documentation to reflect new dependency versions, and clean up GitHub label configurations.
Enhancements:
Documentation:
Tests:
Chores: