-
Notifications
You must be signed in to change notification settings - Fork 348
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: Document type badges #7760
Conversation
{# Non-RFC #} | ||
|
||
{% if doc.became_rfc %} | ||
<div{% if document_html %} class="alert alert-warning small"{% endif %} style="border: dashed 3px green">This is an older version of an Internet-Draft that was ultimately published as <a href="{% if document_html %}{% url 'ietf.doc.views_doc.document_html' name=doc.became_rfc.name %}{% else %}{% url 'ietf.doc.views_doc.document_main' name=doc.became_rfc.name %}{% endif %}">{{doc.became_rfc.name|prettystdname}}</a>.</div> |
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.
why introduce new styling inline? Can this be moved to the css?
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.
I think we still have inline styling in this branch and that it's being applied in cases that aren't intended - right now the tests are failing complaining about the inline styling, and because instead of this on main:
we're seeing this on the PR branch:
This is an active draft, so why the dashed lines, and what happened to the (stir WG)
link?
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.
That (stir WG)
link is what's passed in as submission
@holloway : You've addressed my comments so far. What remains before this PR moves out draft status? |
@holloway (or anyone else puzzled by the test failures earlier): at 1c3fd00 - the issue that caused test fails reporting an invalid document type of "Draft" was the compare and render using type vs type_id:
One bit of django queryset syntactic "assistance" to be aware of. The following are equivalent, because the ORM does helpful work - assume
All of which turn into this SQL
|
|
||
|
||
@register.simple_tag | ||
def document_type_badge(doc, snapshot): |
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.
submission
from the context is being lost here I think
…o fix/doc-type-badge
Internet-Draft | ||
{% endif %} | ||
</span> | ||
{% document_type_badge doc snapshot%} |
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.
this also needs the context?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7760 +/- ##
==========================================
- Coverage 88.78% 88.78% -0.01%
==========================================
Files 296 304 +8
Lines 41320 41439 +119
==========================================
+ Hits 36687 36792 +105
- Misses 4633 4647 +14 ☔ View full report in Codecov by Sentry. |
Asking for a second review given the twisty passages |
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.
Just a couple minor things
See #7475