-
Notifications
You must be signed in to change notification settings - Fork 2
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
Build popups: simplification #414
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,9 @@ | |
instance was deleted at some point. The version name is stored on the build | ||
in this scenario. | ||
{% endcomment %} | ||
{% firstof text build.get_version_name %} | ||
{% if not notext %} | ||
{% firstof text build.get_version_name %} | ||
{% endif %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does need some text, for a couple reasons:
While I agree repeating the project name isn't helpful, it is consistent. For comparison, CircleCI also is redundant when describing builds: This states the project name as the word So, I think project name is best, maybe We should revisit patterns here later. I have a pile of work on popup cards in the milestone https://github.com/readthedocs/ext-theme/milestone/6 |
||
{% endblock chip_text %} | ||
|
||
{% block chip_detail_text %} | ||
|
@@ -30,7 +32,7 @@ | |
{% comment %} | ||
This block is the same as the chip_text block above. | ||
{% endcomment %} | ||
{% firstof text build.get_version_name %} #{{ build.id }} | ||
Build <a href="{% url 'builds_detail' build.project.slug build.pk %}">#{{ build.id }}</a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be marked as translatable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, none of the other cards have linkable titles, as the chip is linked already. For now, the full title should be linked, not just a partial title. This makes translation easier. For later though:
|
||
{% endblock popupcard_header %} | ||
|
||
{% block popupcard_right %} | ||
|
@@ -53,7 +55,7 @@ | |
{% if build.commit %} | ||
<span> | ||
<i class="fad fa-code-commit icon"></i> | ||
{{ build.commit|slice:"0:8" }} | ||
<a href="{{ build.get_commit_url }}">{{ build.commit|slice:"0:8" }}</a> | ||
</span> | ||
{% endif %} | ||
<div class="right floated"> | ||
|
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.
Another parameter isn't required here, we can use
text=" "
to still satisfyfirstof
.However, I'll note below why I think we don't want this.