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 headingLevel error in jinja2 environment for section nav component #3072

Merged
merged 5 commits into from
Mar 11, 2024

Conversation

rmccar
Copy link
Contributor

@rmccar rmccar commented Mar 6, 2024

What is the context of this PR?

Fixes: #3073
Using the section navigation component in a jinja environment without supplying the headingLevel param is causing an error. This is because of the cast to int. I have fixed this in this PR by making the param an int so that the cast doesn't have to happen.

I also noticed that there were a couple of components using titleSize for the same thing so I have updated them to make them consistent across the service.

BREAKING CHANGE
Services using the titleSize param with the card component will now need to rename that param to headingLevel in their config. Services using the headingLevel param with the feedback and section navigation components will need to supply an int instead of a string now.

How to review this PR

Test the card, feedback, summary and section navigation components still work as expected with and without the headingLevel param

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Assignee
  • I have linked the correct Issue

@rmccar rmccar added the Breaking changes This PR contains at least one breaking change label Mar 6, 2024
@rmccar rmccar requested a review from a team March 6, 2024 16:53
Copy link

netlify bot commented Mar 6, 2024

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit eb6d9a0
🔍 Latest deploy log https://app.netlify.com/sites/ons-design-system-preview/deploys/65ef23a2e59403000846e0bb
😎 Deploy Preview https://deploy-preview-3072--ons-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rmccar rmccar self-assigned this Mar 6, 2024
@rmccar rmccar changed the title fix headinglevel error in jinja env for section nav Fix headingLevel error in jinja2 environment for section nav component Mar 6, 2024
@adi-unni adi-unni self-requested a review March 11, 2024 11:23
@rmccar rmccar merged commit 0e9e6b2 into main Mar 11, 2024
9 checks passed
@rmccar rmccar deleted the fix-headinglevel-error-in-jinja-env-for-section-nav branch March 11, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking changes This PR contains at least one breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cast to int causing errors in jinja environment when using section navigation component
3 participants