Skip to content

Core 845 postbake rex link #406

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

Merged
merged 3 commits into from
Apr 1, 2025
Merged

Conversation

TylerZeroMaster
Copy link
Contributor

@TylerZeroMaster TylerZeroMaster commented Mar 25, 2025

https://openstax.atlassian.net/browse/CORE-845

Depends on openstax/enki#405

Mark anchors as needing rex links instead of trying to create the links here. The links are generated much more easily and more accurately in postbake since that step also generates the book/page slugs.

Add a formatted anchor that will be updated in postbake
Copy link

codecov bot commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (f1f99d7) to head (32c7cb4).
Report is 1 commits behind head on main.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #406   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          216       216           
  Lines         3570      3547   -23     
=========================================
- Hits          3570      3547   -23     
Files with missing lines Coverage Δ
lib/kitchen/directions/bake_iframes/v1.rb 100.00% <100.00%> (ø)
lib/kitchen/element_base.rb 100.00% <ø> (ø)
lib/kitchen/patches/string.rb 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@jivey jivey left a comment

Choose a reason for hiding this comment

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

Not familiar with this repo so one small question about how the data attribute gets used

@@ -25,7 +20,7 @@ def bake(book:)

iframe.prepend(child:
<<~HTML
<a class="os-is-link" href="#{iframe_link}" target="_blank" rel="noopener nofollow">#{I18n.t(:iframe_link_text)}</a>
<a class="os-is-link" data-needs-rex-link="true" href="#{iframe_link}" target="_blank" rel="noopener nofollow">#{I18n.t(:iframe_link_text)}</a>
Copy link
Member

Choose a reason for hiding this comment

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

So postbake uses this data attribute to do something? I tried looking it up but didn't find anything (maybe it's not found with the full attribute name?)

Copy link
Contributor Author

@TylerZeroMaster TylerZeroMaster Mar 31, 2025

Choose a reason for hiding this comment

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

@jivey those changes can be found in the other PR: openstax/enki#405.

Copy link
Member

Choose a reason for hiding this comment

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

Ah thanks I did not notice the second link

@TylerZeroMaster TylerZeroMaster merged commit 18b23df into main Apr 1, 2025
6 checks passed
@TylerZeroMaster TylerZeroMaster deleted the core-845-postbake-rex-link branch April 1, 2025 16:04
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