Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Meta issue: #1980004: [meta] Creating Dream Markup
Issue based on: [#book module]
Questions:
Why don't we move arrows from navigation to css pseudo classes ::before or ::after?
Why don't we give appropriate names to pager items?
Markup proposal:
{% for book_id, menu in book_menus %}
<nav class="book-menu">
{{ menu }}
</nav>
{% endfor %}
{% if tree or has_links %}
<nav class="book-navigation">
{{ tree }}
{% if has_links %}
<h2 class="element-invisible">{{ 'Book Navigation'|t }}</h2>
<ul class="book-pager">
{% if prev_url %}
<li class="book-page-previous">
<a href="{{ prev_url }}" rel="prev" title="{{ 'Go to previous page'|t }}"> {{ prev_title }}</a>
</li>
{% endif %}
{% if parent_url %}
<li class="book-page-parent">
<a href="{{ parent_url }}" title="{{ 'Go to parent page'|t }}">{{ 'Up'|t }}</a>
</li>
{% endif %}
{% if next_url %}
<li class="book-page-next">
<a href="{{ next_url }}" rel="next" title="{{ 'Go to next page'|t }}">{{ next_title }}</a>
</li>
{% endif %}
</ul>
{% endif %}
</nav>
{% endif %}
Comments
Comment #1
oresh CreditAttribution: oresh commentedComment #2
oresh CreditAttribution: oresh commentedmoving to core issues.
Comment #3
ry5n CreditAttribution: ry5n commentedCorrect me if I’m wrong, but doesn’t this represent a generic tree UI component? If so, it should be abstracted to be reusable and the 'book' classes dropped.
Comment #4
mgiffordDo we have other generic tree UI components? I suppose that folks who don't know Drupal modules will have a better sense of what it does. People who do know the Book module will get it too. Sounds like a good suggestion @ry5n.
Is text with 'page' still relevant? Do we need to change 'Book Navigation' to 'Tree Navigation'? That I'm not sure about. How tree navigation is going to be used differently in D8 than the Book module is the think I'm not sure about.
General navigation structure looks good to me.
Comment #17
quietone CreditAttribution: quietone at PreviousNext commentedMoving to the book module, which is being deprecated, see #3376070: [Meta] Tasks to deprecate Book module. It will be removed from core and moved to a contrib project, #3376101: [11.x] [Meta] Tasks to remove Book.
This is now Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
This issue may be re-opened if it can be considered critical, If unsure, re-open the issue and ask in a comment.