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

apps/projects plans /contrib /ideas /mapideas /cms: added missing html_tag for… #4041

Merged
merged 2 commits into from
Dec 8, 2021

Conversation

sabinammm
Copy link
Contributor

@sabinammm sabinammm commented Dec 7, 2021

… accessibility to dates

Fixes #4017

In order to find out which templates should use the html_tag for dates, the code was searched for the date filter.
6 of the 7 templates changed had very similar lines that were changed. Only one was changed from a blocktrans to trans because adding the html_tag to the the blocktrans would break it.

@github-actions
Copy link

github-actions bot commented Dec 7, 2021

Coverage report

Total coverage

Status Category Percentage Covered / Total
🔴 Statements 4.7% 59/1254
🔴 Branches 3.46% 25/722
🔴 Functions 5.57% 23/413
🔴 Lines 8.56% 317/3702

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Report generated by 🧪jest coverage report action from c997cd5

@sabinammm sabinammm force-pushed the sm-2021-12-06-add-time-html-tag-to-date-objects branch from cc4f770 to 865f790 Compare December 7, 2021 14:52
@sabinammm sabinammm changed the title WIP apps/plans /contrib /ideas /mapideas /cms: added missing html_tag for… apps/plans /contrib /ideas /mapideas /cms: added missing html_tag for… Dec 7, 2021
@sabinammm sabinammm changed the title apps/plans /contrib /ideas /mapideas /cms: added missing html_tag for… WIP apps/plans /contrib /ideas /mapideas /cms: added missing html_tag for… Dec 7, 2021
@sabinammm sabinammm force-pushed the sm-2021-12-06-add-time-html-tag-to-date-objects branch from 865f790 to 3e99630 Compare December 7, 2021 14:56
@sabinammm sabinammm changed the title WIP apps/plans /contrib /ideas /mapideas /cms: added missing html_tag for… apps/projects plans /contrib /ideas /mapideas /cms: added missing html_tag for… Dec 7, 2021
@sabinammm sabinammm requested review from khamui, philli-m and Rineee and removed request for khamui and philli-m December 7, 2021 14:58
Copy link
Contributor

@khamui khamui left a comment

Choose a reason for hiding this comment

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

very nice! working fine.
just a little comment :)

Note: we would need this for the new react list as well. Will make a note somewhere.

@@ -50,7 +50,7 @@ <h1 class="item-detail__title">{{ object.name }}</h1>
<div class="item-detail__meta lr-bar">
<div class="lr-bar__left">
<strong class="item-detail__creator">{{ object.creator.username }}</strong>
{% if object.modified %}{% trans 'updated on ' %}{{ object.modified|date }}{% else %}{% trans 'created on ' %}{{ object.created|date }}{% endif %}
{% if object.modified %}{% trans 'updated on ' %}{% html_date object.modified class='list-item__date' %}{% else %}{% trans 'created on ' %}{% html_date object.created class='list-item__date' %}{% endif %}
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we could break this very long lines into shorter blocks? just for readability. what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's a good idea. I will change it.

@sabinammm
Copy link
Contributor Author

very nice! working fine. just a little comment :)

Note: we would need this for the new react list as well. Will make a note somewhere.

@khamui I was just writing an issue b/c I noticed the same for the Comments in a4.

@sabinammm sabinammm force-pushed the sm-2021-12-06-add-time-html-tag-to-date-objects branch from 3e99630 to 2466ade Compare December 8, 2021 10:06
@sabinammm sabinammm force-pushed the sm-2021-12-06-add-time-html-tag-to-date-objects branch from 2466ade to c997cd5 Compare December 8, 2021 10:14
@sabinammm
Copy link
Contributor Author

@khamui I shortened the changed code lines in commit 1. Commit 2 I shortened just the way too long lines in these files and changed some indents.

@sabinammm sabinammm requested a review from khamui December 8, 2021 11:14
@khamui
Copy link
Contributor

khamui commented Dec 8, 2021

yeah! i think it makes sense to improve readability whenever possible, so fine if you shortened lines which are not related to the task, but improves readability.

@khamui khamui merged commit 18fa38d into main Dec 8, 2021
@khamui khamui deleted the sm-2021-12-06-add-time-html-tag-to-date-objects branch December 8, 2021 14:17
sabinammm added a commit that referenced this pull request Dec 9, 2021
sabinammm added a commit that referenced this pull request Dec 9, 2021
sabinammm added a commit that referenced this pull request Dec 9, 2021
khamui pushed a commit that referenced this pull request Dec 9, 2021
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.

should we use html_date everywhere?
2 participants