Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Build popups: simplification #414

wants to merge 3 commits into from

Conversation

humitos
Copy link
Member

@humitos humitos commented Jul 4, 2024

This commit simplifies the build chip a little:

  • removes the text for the list item since it always repeat the name of the project and there is no need to show it so many times
  • removes the name of the project from the popup title for the same reason
  • adds the text "Build" to the title since it conveys a more clear meaning
  • makes the build number clickable, so we can go to the build details page from the chip's title
  • adds a link to the commit URL
Old New
Screenshot_2024-07-04_13-58-38 Screenshot_2024-07-04_13-58-02
Screenshot_2024-07-04_13-58-29 Screenshot_2024-07-04_13-57-53

This commit simplifies the build chip a little:

- removes the `text` for the list item since it always repeat the name of the
  project and there is no need to show it so many times

- removes the name of the project from the popup title for the same reason

- adds the text "Build" to the title since it conveys a more clear meaning

- makes the build number clickable, so we can go to the build details page from
  the chip's title
@humitos humitos requested a review from a team as a code owner July 4, 2024 12:01
@humitos humitos requested a review from agjohnson July 4, 2024 12:01
@@ -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>
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be marked as translatable.

Copy link
Contributor

Choose a reason for hiding this comment

The 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:

  • Link does not display as blue text, this doesn't look as nice
  • We should do this at the base template so that all popupcards operate the same way.

@@ -183,7 +183,7 @@
{% with build=object.last_build %}
{% if build %}
<div class="item">
{% include "includes/elements/chips/build.html" with build=build text=object.project.name %}
{% include "includes/elements/chips/build.html" with build=build notext=True %}
Copy link
Contributor

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 satisfy firstof.

However, I'll note below why I think we don't want this.

{% firstof text build.get_version_name %}
{% if not notext %}
{% firstof text build.get_version_name %}
{% endif %}
Copy link
Contributor

Choose a reason for hiding this comment

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

This does need some text, for a couple reasons:

  • This is the main content of the .ui.label and it looks too padded/empty without this
  • The other popup cards use all this same pattern - icon, main content, and detail content

image

While I agree repeating the project name isn't helpful, it is consistent. For comparison, CircleCI also is redundant when describing builds:

image

This states the project name as the word Build looks even more redundant and isn't useful information in addition:

image

So, I think project name is best, maybe Build is okay, but this text should be something.

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

@agjohnson agjohnson added this to the New dashboard features milestone Jul 9, 2024
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