#4722 Add missing tooltips with utc times
Merged by pingou. Opened by jlanda.
jlanda/pagure timestamps  into  master

Download 4722.patch

Fixes #4656

I wrote a new filter for the general humanize case. There are cases where the new filter does not work, but it covers a lot of them.

I'll appreciate any feedback before continuing with themes

Did not test nor run test suite yet, so this could explode right now :)

Why are we forcing UTC? Is it because we don't have a timezone setting for pagure accounts?

Why are we forcing UTC? Is it because we don't have a timezone setting for pagure accounts?

DING.

Anyhow, my new filter calls timestamp filter. There is a comment on it:

    # We *could* enhance this by allowing users to specify preferred
    # timezone, localized time format etc. and customizing this display
    # to user's preferences. But we don't have that, so for now, we
    # always use UTC timezone, and we don't use localized forms like
    # %b or %d because they will be 'localized' for the *server*.
    # This format should be pretty 'locale-neutral'.

So if we fix this someday, the new humanize_tooltip will use it too

Sounds good to me. Let's see if the tests agree!

Looks like this is conflicting now :(

rebased onto ec486ef788e50ffad62e59cb1760f442e3573beb

Looks like this is conflicting now :(

Luckily there was just one conflict. Rebased, I'll local test & align tests with the new html asap

2 new commits added

  • pagure/templates: replace humanize with humanize_tooltip where has sense
  • ui/filters: new filter for humanized dates with tooltip

test_pagure_flask_ui_fork.py errors should be fixed now (and they test that there is an span with a title btw)

pretty please pagure-ci rebuild

rebased onto c539b4ff3a87ebd6d3887947dba0a0bc6b7c4154

rebased onto 0e6fc8364ffbe83665eee74c4d81a247003eb78d

rebased onto 115ca135e2847685992c635cc05c903c4b61f7dd

On python3 this shows up as "UTCs" does it do the same to you?

On python3 this shows up as "UTCs" does it do the same to you?

Good catch, the final s should not be there.

rebased onto ec486ef788e50ffad62e59cb1760f442e3573beb

Fixed

And now tests check tooltip content :)

rebased onto 144c35cda83a1f0ce08ea079279c6f1e44ec5667

Hm if we check the issue list, the size of the font in the tooltip is different for the creation and the modification dates here. Do you see this as well?

Which makes me wonder if we shouldn't just change the date creation as there is no link there anyway (or re-use the same structure with data-tooltip in the filter)

2 new commits added

  • pagure/templates: replace humanize with humanize_tooltip where has sense
  • ui/filters: new filter for humanized dates with tooltip

Which makes me wonder if we shouldn't just change the date creation as there is no link there anyway (or re-use the same structure with data-tooltip in the filter)

data-tooltip thing enables boostrap styling. I added it to the filter, and now we have consistency on issues list. Anyway, we have a bunch of non timestamp related <span titiles without data-tooltip.

I'll open a ticket for that

2 new commits added

  • pagure/templates: replace humanize with humanize_tooltip where has sense
  • ui/filters: new filter for humanized dates with tooltip

pretty please pagure-ci rebuild

====== 8 failed, 1634 passed, 7 skipped, 300 warnings in 1436.71 seconds =======

One of them is black (easyfix) the other one don't quite seem related to this PR but are also a tad worrying/annoying :(

Ok, no, so all the failing tests (but black) are related to the change made to MERGED_PATTERN

2 new commits added

  • pagure/templates: replace humanize with humanize_tooltip where has sense
  • ui/filters: new filter for humanized dates with tooltip

2 new commits added

  • pagure/templates: replace humanize with humanize_tooltip where has sense
  • ui/filters: new filter for humanized dates with tooltip

rebased onto 8782ae2ce9ad032227a0ddb931c6bbd7fd6946cc

Thanks! :)

Pull-Request has been merged by pingou

Metadata