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

Deprecate element dom_id and dom_id_class #3005

Merged
merged 3 commits into from
Sep 3, 2024
Merged

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Sep 2, 2024

What is this pull request for?

Relying on an implicit DOM id and class in element_view_for is deprecated.

Please provide an explicit id or class if you actually want to render these attributes on the element wrapper tag.

Please pass an explicit id to the element_view_for helper instead.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@tvdeyen tvdeyen added this to the 7.3 milestone Sep 2, 2024
@tvdeyen tvdeyen requested a review from a team as a code owner September 2, 2024 14:36
Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.47%. Comparing base (86cdac7) to head (761e20f).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3005   +/-   ##
=======================================
  Coverage   96.46%   96.47%           
=======================================
  Files         237      237           
  Lines        6393     6403   +10     
=======================================
+ Hits         6167     6177   +10     
  Misses        226      226           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Very handy to silence Alchemy::Deprecation in an RSpec example.
Relying on an implicit DOM id and class in `element_view_for` is deprecated.

Please provide an explicit `id` or `class` if you actually want to render these attributes on the element wrapper tag.
Please pass an explicit `id` to the `element_view_for` helper instead.
Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

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

The notice about using headline elements with an anchor tag should go into the changelog, IMO.

@tvdeyen
Copy link
Member Author

tvdeyen commented Sep 3, 2024

The notice about using headline elements with an anchor tag should go into the changelog, IMO.

The changelog is automatically created from PR titles.

Also it is only one of the possible solutions to add an ID to the element wrapper.

@tvdeyen tvdeyen merged commit d04bb07 into main Sep 3, 2024
36 checks passed
@tvdeyen tvdeyen deleted the deprecate-element-dom-id branch September 3, 2024 10:01
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.

2 participants