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

[B5] settings: API keys page #34593

Merged
merged 15 commits into from May 20, 2024
Merged

[B5] settings: API keys page #34593

merged 15 commits into from May 20, 2024

Conversation

orangejenny
Copy link
Contributor

@orangejenny orangejenny commented May 10, 2024

Product Description

This is the last view in settings.

It adds datepickers to our tempus dominus library, and it migrates the base CRUD page that's used in a few parts of HQ.

before
Screenshot 2024-05-09 at 9 38 06 PM

after
Screenshot 2024-05-09 at 9 37 35 PM

Safety Assurance

Safety story

UI changes, risk is pretty well limited to this page.

Automated test coverage

Not much if any at the UI level.

QA Plan

https://dimagi.atlassian.net/browse/QA-6513

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@orangejenny orangejenny added awaiting QA QA in progress. Do not merge product/all-users-all-environments Change impacts all users on all environments labels May 10, 2024
@orangejenny orangejenny requested review from mjriley and a team May 10, 2024 01:45
Copy link
Contributor

@jingcheng16 jingcheng16 left a comment

Choose a reason for hiding this comment

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

Hi Jenny, I don't have enough knowledge to review the js changes you made in this PR. But left two questions for html changes.

@millerdev
Copy link
Contributor

Aside, and not a criticism of this PR: maybe it's a sign that I'm old, but I find the new inline labels and fields layout to be harder to read than the two-column layout on a large screen. I think it was changed to accommodate mobile devices, and if that's true I think it's a place where responsive design might be nice (use columns on large screen, inline on small).

@biyeun
Copy link
Member

biyeun commented May 14, 2024

@orangejenny @millerdev I think the form might be harder to follow now due to lack of whitespace. usually the fields should be wrapped in mb-3 to add a margin at the bottom.

@orangejenny
Copy link
Contributor Author

@biyeun Good eye. #34592 affected crispy rendering in some way such that the mb-3 spacing wasn't being added. Fixed in f9e382a, and the form does now have a bit more breathing room.
Screenshot 2024-05-14 at 5 46 59 PM

@jingcheng16
Copy link
Contributor

Just curious, (if the two column layout refers to left column being label and right column being input field ), why the two column layout becomes one column in this PR? I cannot identify the related code changes...

@orangejenny
Copy link
Contributor Author

@jingcheng16 It's almost invisible. Because the form on this page uses crispy forms, adding the use_bootstrap5 decorator is enough to do the layout switch. Code like this template in our crispy3to5 repo checks the B5 flag to determine what kind of layout to display.

There are also places that key off the containing form_class CSS class, like this. Those made it necessary to make the change in f9e382a which removes the form-horizontal class for B5 forms (the crispy.py change specifically, which overrides this line earlier in HQFormHelper).

@jingcheng16
Copy link
Contributor

@orangejenny I see.Thank you for the explanation and all the links! ❤️

This fires when the user submits the creation form, and django sends back
a new form, so the date picker needs to be re-initialized.
@orangejenny orangejenny added QA Passed and removed awaiting QA QA in progress. Do not merge labels May 20, 2024
@orangejenny orangejenny merged commit 3a44014 into master May 20, 2024
12 of 13 checks passed
@orangejenny orangejenny deleted the jls/b5-api-keys branch May 20, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/all-users-all-environments Change impacts all users on all environments QA Passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants