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

24 hour format #15194

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open

24 hour format #15194

wants to merge 1 commit into from

Conversation

aeter
Copy link

@aeter aeter commented May 15, 2024

SUMMARY

Related: #15005, #11531

(continues PR #15186 )

Adds 24 hour format across the user interface. Configurable at the Settings page, using a dropdown.

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API
  • UI
AWX VERSION
make VERSION
awx: 
ADDITIONAL INFORMATION

I'm sorry, this seems like a big PR.
I don't like passing useConfig() everywhere. Do you think using a cookie (set at login) would be better?
I've ran throught the UI, seemed OK.

Ran these (the tests passed):

npm run prettier
npm run lint
npm run test
make black

@aeter
Copy link
Author

aeter commented May 16, 2024

settings dropdown:
settings_dropdown

example page (schedules) with 24-hour format:
example_schedule_24h

@aeter
Copy link
Author

aeter commented May 17, 2024

I'm ready to rework the code, if you think the implementation is not good, or any details need changing.

So, at first it seemed using something like zustand would make sense here - like, setting datetime_format on login and then reading it from the util/dates.js. Then the PR would touch like 10 files instead of 53, as the formatDateTime signature wouldn't change. But I didn't want to introduce such a dependency to your project - without even discussing, but just inserting it into the code. Anyway.

Signed-off-by: Adrian Nackov <adrian.nackov@mail.schwarz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant