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

File Upload Button Style #33902

Merged
merged 3 commits into from
Jan 1, 2024
Merged

File Upload Button Style #33902

merged 3 commits into from
Jan 1, 2024

Conversation

Jtang-1
Copy link
Contributor

@Jtang-1 Jtang-1 commented Dec 20, 2023

Product Description

Changes style of "Choose File" button to match other CommCare buttons. More generally, this affects all buttons of an input element of type="file". This is a platform level change,.
Before:
Screen Shot 2023-12-20 at 12 56 09 AM

After:
Screen Shot 2023-12-20 at 12 54 25 AM

Technical Summary

Jira Ticket: https://dimagi-dev.atlassian.net/browse/USH-3937

Feature Flag

No feature flag

Safety Assurance

Safety story

tested locally and on staging. Limited to style change.

Automated test coverage

no auomated test

QA Plan

No QA.

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

@Jtang-1 Jtang-1 added the product/all-users-all-environments Change impacts all users on all environments label Dec 20, 2023
@Jtang-1 Jtang-1 marked this pull request as ready for review December 20, 2023 22:16
@Jtang-1 Jtang-1 requested a review from orangejenny as a code owner December 20, 2023 22:16
@Jtang-1 Jtang-1 requested a review from nospame December 21, 2023 17:58
@@ -1,8 +1,16 @@
@import "../../../../../../node_modules/bootstrap/less/buttons.less";
Copy link
Contributor

Choose a reason for hiding this comment

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

That's a gnarly import. But it does seem to be how we do it in other places.

Comment on lines +43 to +48
.btn-group-xs > .btn, .btn-xs {
padding: 1px 5px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this set of styles needed for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

btn-xs no longer exists for bootstrap 5 so this style recreates it

@Jtang-1 Jtang-1 merged commit cdf3565 into master Jan 1, 2024
12 checks passed
@Jtang-1 Jtang-1 deleted the jt/file-upload-style branch January 1, 2024 23:00
@biyeun
Copy link
Member

biyeun commented Jan 4, 2024

hey @Jtang-1, for the future, the solution to missing classes for the bootstrap migration should not be to add the missing style. In the case of bootstrap 5, btn-xs was renamed to btn-sm and has the same functionality. Please remove this addition from the stylesheet. Thanks!

The migration helper script covers btn-xs here:

cc @nospame

@biyeun
Copy link
Member

biyeun commented Jan 4, 2024

@Jtang-1 see Bootstrap's Migration guide for the full explanation of dropping the btn-xs class
https://getbootstrap.com/docs/4.6/migration/#buttons

@Jtang-1 Jtang-1 mentioned this pull request Jan 4, 2024
3 tasks
@Jtang-1
Copy link
Contributor Author

Jtang-1 commented Jan 4, 2024

@biyeun Thanks for the explanation, removed that addition in this PR #33945

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants