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

Highlight the late tasks in the Action Task List #424

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

lilia1891
Copy link
Collaborator

UI improvement: Display late tasks as late in action task list - Asana https://app.asana.com/0/1205310117865974/1207617873637474/f

  • Reused StatusBadge component for visual consistency to mark the late tasks within the ListGroupItem.
  • Highlighted the entire ListGroupItem when a task is marked as late, using the background color from the StatusBadge/late.
  • Added English translations for the "Late" label.
Screen Shot 2024-10-29 at 09 20 01

To do next: Add translations for the "Late" label via Weblate to support other languages.

Copy link
Contributor

@tituomin tituomin left a comment

Choose a reason for hiding this comment

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

Optional improvement with refactoring common code.

</ListGroupItem>
));
.map((item) => {
const isLate = !completed && new Date(item.dueAt) < new Date();
Copy link
Contributor

Choose a reason for hiding this comment

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

Extract isLate into a function (see above)?
Also, just a curious peculiarity: new Date() is always in the browser's local timezone, but item.dueAt is in the plan's local timezone. I don't think we need to do anything about it though, because it always works as intended from the customer's own browsers. Only from the other side of the world it might sometimes be one day off but no big deal.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Renamed to isTaskLate and extracted into a reusable function.

@lilia1891 lilia1891 merged commit 661a5da into master Oct 29, 2024
2 of 3 checks passed
@lilia1891 lilia1891 deleted the feat/highlight-late-tasks branch October 29, 2024 11:41
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