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

Fix dashboard greetings that show 'good morning' after noon #24970

Merged
merged 1 commit into from
Jan 5, 2021
Merged

Fix dashboard greetings that show 'good morning' after noon #24970

merged 1 commit into from
Jan 5, 2021

Conversation

nina-py
Copy link
Contributor

@nina-py nina-py commented Jan 5, 2021

Updated dashboard greetings to show "Good afternoon" after 12:00 instead of 13:00.

Updated time periods for greetings:

  • Morning: 5:00 to 11.59
  • Afternoon: 12:00 to 17.59
  • Evening: 18:00 to 21:59
  • Night: 22:00 to 4.59

Updated night-time greeting to "Hello" as "Good night" is a kind of goodbye.

Had a look at the history of that component and noted how it evolved over time. Decided to do a bit of a refactor to remove repetitive code; some code duplication is inevitable though as translation strings need to remain intact.

Closes #24938.

Signed-off-by: Nina Pypchenko [email protected]

Updated dashboard greetings to show "Good afternoon" after 12:00 instead of 13:00.

Updated time periods for greetings:
- Morning: 5:00 to 11.59
- Afternoon: 12:00 to 17.59
- Evening: 18:00 to 21:59
- Night: 22:00 to 4.59

Updated night-time greeting to "Hello" as "Good night" is a kind of goodbye.

Closes #24938.

Signed-off-by: Nina Pypchenko <[email protected]>
@rullzer rullzer added the 3. to review Waiting for reviews label Jan 5, 2021
@juliusknorr juliusknorr added this to the Nextcloud 22 milestone Jan 5, 2021
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

👍

@julien-nc julien-nc merged commit ef07323 into nextcloud:master Jan 5, 2021
@nina-py nina-py deleted the 24938-dashboard-greetings-show-good-morning-after-noon branch January 6, 2021 00:08
@nina-py
Copy link
Contributor Author

nina-py commented Jan 6, 2021

Thank you for reviewing and merging this so quickly!

@rullzer rullzer mentioned this pull request Jan 6, 2021
5 tasks
@rullzer rullzer modified the milestones: Nextcloud 22, Nextcloud 21 Jan 8, 2021
return { text: shouldShowName ? t('dashboard', 'Good afternoon, {name}', { name: this.displayName }) : t('dashboard', 'Good afternoon') }
// Determine part of the day
let partOfDay
if (time >= 22 && time < 5) {
Copy link

Choose a reason for hiding this comment

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

This should be a logical OR instead of AND.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, see #25110 .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for picking this up @graue70!

@jancborchardt
Copy link
Member

Thanks a lot for the fix @nina-py! If you would like to contribute more, we also have some community chat channels on our Nextcloud Talk instance, including specific channels e.g. for the Dashboard app and others. Let me know if you are interested and I can add you there. :)

@nina-py
Copy link
Contributor Author

nina-py commented Feb 15, 2021

Hi @jancborchardt, my pleasure! Yes, I'd like to be added to the community chat - I've participated there as a guest. And thanks for the invite to the Nextcloud org - I'm definitely taking you up on that :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard greetings shows goodmorning while it is after 12:00 (24h)
6 participants