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

New frontend HTML/CSS theme #160

Merged
merged 1 commit into from
Aug 25, 2017
Merged

Conversation

mizdebsk
Copy link
Member

Reworked web interface - mostly complete, but still work in progress. Deployed in staging.

Changes include:

  • new theme based on Bootstrap 4 Alpha and fedora-bootstrap
  • no table-based layouts - Bootstrap grid is used instead
  • reworked layout for some views
  • icons with Font Awesome
  • different classes of flash flashes
  • added human-readable time and number representation
  • new logo

@msimacek
Copy link
Contributor

How is it supposed to be installed for development and production? There are absolute paths to your filesystem, so I'm not sure how I should test it

@mizdebsk
Copy link
Member Author

These are not absolute paths, but URLs relative to deployment URL: https://apps.fedoraproject.org/
I've also uploaded tarball with these resources at https://mizdebsk.fedorapeople.org/tmp/koschei-fb-global.tar.bz2

@msimacek
Copy link
Contributor

Thanks. And what is the plan for production? Would the stylesheets be packaged as RPMs?

@mizdebsk
Copy link
Member Author

For production in Fedora infrastructure, we would use resources already available on apps.fedoraproject.org, like https://apps.stg.fedoraproject.org/global/fedora-bootstrap-1.0.3/fedora-bootstrap.css
For non-Fedora-infra deployments, I don't know yet.

@msimacek
Copy link
Contributor

Would it work with unbranded bootstrap?

@mizdebsk
Copy link
Member Author

Yes.

@msimacek
Copy link
Contributor

Then what about putting the URL set in configuration and leaving the decision for the admin? Fedora deployments would use apps.fedoraproject, non-fedora deployments could use some of the public CDNs or host their own copy

@mizdebsk
Copy link
Member Author

Sure. I'll do that.

if encoded:
return '?' + encoded
return ''

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please keep this if? It looks ugly when all URLs now have a trailing ?. People wll be copying those to emails and IRC

Copy link
Member Author

Choose a reason for hiding this comment

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

This is not just cosmetic, but there is technical reason - URL "?" is valid and means "current page with empty query args". Alternative would be specifying full relative URL. But if you insist I can work on that.

<div class="float-right">
<a class="btn btn-secondary btn-sm" href="{{ url_for('build_detail', build_id=build.id) }}"
data-toggle="tooltip" data-placement="right"
title="Show details of this build">...</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 could be more intuitive with an icon like fa-info or fa-info-circle

Copy link
Member Author

Choose a reason for hiding this comment

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

I've changed it to fa-info, but for me ellipsis was better.

</div>

{% for (name, url) in generate_links(package) %}
<a class="card-link" href="{{ url }}">{{ name }}</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you put less links per row? There's a lot of space underneath, I'd suggest just 2 columns

Copy link
Member Author

Choose a reason for hiding this comment

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

I've made it into 2 columns as suggested.

{% if items|length > max %}
<div class="row">
<div class="col-sm-2 offset-5">
<a class="btn btn-secondary btn-sm kk-toggle-button"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you put some margin around this button or below the change list? It sometimes touches the descenders of the last line.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added "mt-2" margin.

@@ -24,183 +24,6 @@
Michael Simacek <msimacek@redhat.com>
*/

html {
min-width: 800px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add the following, so that the font sizing matches other Fedora apps that use bootstrap-fedora?

html {
    font-size: 14px;
}

<dd class="col-sm-9">
<ul class="list-inline">
{% for owner in group.owners %}
<li class="list-inline-item">{{ owner.name }}</li>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please join them with commas? Also the spacing looks a bit odd, maybe it would look better without columns

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

</li>
{% endfor %}
</ul>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

The collection chooser was quite ugly, but it was there for a reason. When you click a package link in a multicollection view (like group packages or user packages), you always get package detail for the first collection (in fedora it's rawhide). So a user goes to listing of his packages, he sees that foo is broken in epel7, clicks on it and gets confused, because he sees that the builds are ok, because he is looking at rawhide, even though he wanted epel7. This gets much worse for deployments that have sparse collections (there are many collections, but packages usually exist in just one or two of them) - you click on a package link and you're almost always greeted with a message that the package doesn't exist in selected collection.

Copy link
Contributor

Choose a reason for hiding this comment

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

And with the current tabs, if you didn't select a collection, none of them is displayed as active, so you don't know which collection you're looking at.

Copy link
Member Author

Choose a reason for hiding this comment

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

When you click a package link in a multicollection view (like group packages or user packages), you always get package detail for the first collection (in fedora it's rawhide).

The same happens in current master too (without this PR).

Do we want to fix it? I.e not show any builds unless explicit collection is choosen.

Copy link
Contributor

Choose a reason for hiding this comment

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

The same happens in current master too (without this PR).

That's true. I'm wondering when it regressed.

Do we want to fix it? I.e not show any builds unless explicit collection is choosen.

It was quite important in deployments that didn't have a "master" collection like Fedora has. Since we currently don't maintain such deployments, I think we can keep the current behavior until we need more flexibility again.

@mizdebsk mizdebsk force-pushed the mizdebsk/fedora-bootstrap-theme branch 2 times, most recently from a50f508 to a867737 Compare August 25, 2017 06:58
@mizdebsk mizdebsk changed the title [WiP] New frontend HTML/CSS theme New frontend HTML/CSS theme Aug 25, 2017
@mizdebsk mizdebsk force-pushed the mizdebsk/fedora-bootstrap-theme branch from a867737 to 15e2eeb Compare August 25, 2017 07:31
@mizdebsk
Copy link
Member Author

@msimacek This should be reviewable. I think I've addressed all your concerns or commented on them.

Would it work with unbranded bootstrap?

I've used some components specific to fedora-bootstrap (masthead, subheader), so this won't work with pure bootstrap any longer.

@msimacek msimacek merged commit 15e2eeb into master Aug 25, 2017
@msimacek msimacek deleted the mizdebsk/fedora-bootstrap-theme branch August 25, 2017 21:00
@mizdebsk
Copy link
Member Author

Thanks!

@msimacek msimacek mentioned this pull request Aug 28, 2017
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