-
Notifications
You must be signed in to change notification settings - Fork 132
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
Byline: adding documentation, moving to main title #2452
base: master
Are you sure you want to change the base?
Conversation
@duboisp I have set the status of the byline component to deprecated. However, if we want to get this pull request out without triggering a major release, I can change it to demoted instead. |
Pre-approved upon successful review. |
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.
See my comment inline.
Note: We will need to discuss if we apply that by default to the last paragraph in the hgroup or if we require this to be activated by the author by using a CSS class. The second option will allow us to use the paragraph under the h1 for something else considering that the trial currently is to remove the byline.
}, | ||
"modified": "2024-12-10", | ||
"componentName": "byline", | ||
"status": "deprecated", |
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.
"status": "deprecated", | |
"status": "demoted", |
We will formally deprecate it at our next major version
"en": "Institutional byline - default", | ||
"fr": "Institution responsable - par défaut" | ||
}, | ||
"status": "deprecated", |
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.
"status": "deprecated", | |
"status": "demoted", |
"en": [ | ||
{ | ||
"@type": "source-code", | ||
"description": "Code sample:", | ||
"code": "<p class=\"gc-byline\"><strong>From <a href=\"#\">[Institution name]</a></strong></p>" | ||
} | ||
], |
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.
Add each possible variation as code sample
[h1] + <p class="gc-byline">From <a href=\"#\">[Institution name]</a></p>
[h1] + <p><strong>From <a href=\"#\">[Institution name]</a></strong></p>
(You already have that one)
[h1] + <p class="gc-byline"><strong>From <a href=\"#\">[Institution name]</a></strong></p>
{ | ||
"@id": "_:cs_byline_2", | ||
"name": "Institutional byline - version 2", | ||
"status": "deprecated", |
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.
"status": "deprecated", | |
"status": "demoted", |
{ | ||
"@id": "_:cs_byline", | ||
"name": "Institutional byline", | ||
"status": "deprecated", |
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.
"status": "deprecated", | |
"status": "demoted", |
{%- if page.byline -%} | ||
<p>{% if page.language == "fr" %}De :{% else %}From:{% endif %} <a href="{{ page.byline.url }}">{{ page.byline.institution }}</a></p> | ||
{%- endif -%} |
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.
Do we make it default or should we make the author to enable this, like by using the gc-byline class on the last paragraph?
We just need to think long term, do we want to lock down the last paragraph for a byline that is now half demote and still alive on news pages knowing that there is an intention to get it replaced by gc-contributor
instead. Let have an internal discussion about it.
cc @Ricokola
I do think we should have something like to allow us to re-use that last paragraph in the "hgroup" heading section for other purpose:
{%- if page.byline -%} | |
<p>{% if page.language == "fr" %}De :{% else %}From:{% endif %} <a href="{{ page.byline.url }}">{{ page.byline.institution }}</a></p> | |
{%- endif -%} | |
{%- if page.byline -%} | |
<p class="gc-byline">{% if page.language == "fr" %}De :{% else %}From:{% endif %} <a href="{{ page.byline.url }}">{{ page.byline.institution }}</a></p> | |
{%- endif -%} |
or
{%- if page.byline -%} | |
<p>{% if page.language == "fr" %}De :{% else %}From:{% endif %} <a href="{{ page.byline.url }}">{{ page.byline.institution }}</a></p> | |
{%- endif -%} | |
<hgroup class="with-byline"> | |
.... | |
{%- if page.byline -%} | |
<p>{% if page.language == "fr" %}De :{% else %}From:{% endif %} <a href="{{ page.byline.url }}">{{ page.byline.institution }}</a></p> | |
{%- endif -%} | |
</hgroup> |
@@ -32,4 +32,9 @@ hgroup#wb-cont { | |||
h1 { | |||
margin-top: 0; | |||
} | |||
|
|||
p:last-child { |
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.
See the inner comment in the main-page-title include file
p:last-child { | |
&with-byline p:last-child { |
p:last-child { | |
p:last-child.gc-byline { |
@@ -91,6 +91,16 @@ | |||
"title": "Titre principal superposé aligné à droite", | |||
"language": "fr", | |||
"path": "main-page-title-stacked-align-right-fr.html" | |||
}, | |||
{ | |||
"title": "Main page title with byline", |
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.
Let's mention this is context specific to news article
"title": "Main page title with byline", | |
"title": "Main page title with byline for news articles", |
"path": "main-page-title-byline-en.html" | ||
}, | ||
{ | ||
"title": "Titre principal avec institution responsable", |
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.
"title": "Titre principal avec institution responsable", | |
"title": "Titre principal avec institution responsable pour les article de nouvelles", |
"en": "Main page title with byline", | ||
"fr": "Titre principal avec institution responsable" |
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.
"en": "Main page title with byline", | |
"fr": "Titre principal avec institution responsable" | |
"en": "Main page title with byline for news articles", | |
"fr": "Titre principal avec institution responsable pour les article de nouvelles" |
Related to WET-494