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

When a control in "Access control" settings is unchecked, hide that control #5589

Merged
merged 5 commits into from
May 17, 2023

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented May 16, 2023

Closes #5581

What has been done to verify that this works as intended?

I've tested the changes manually and updated automated tests.

Why is this the best possible solution? Were any other approaches considered?

As described in the issue, we decided that in order to make the behavior consistent across the app, the buttons should be hidden not disabled. When it comes to the implementation itself there is nothing important to discuss here.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

It's a safe pr, please just verify that buttons are hidden (if disabled in settings) as described in the issue.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 requested a review from seadowg May 16, 2023 10:52
Copy link
Member

@seadowg seadowg left a comment

Choose a reason for hiding this comment

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

The buttons are no longer constrained by the size of the warning card:

image


<View
Copy link
Member

Choose a reason for hiding this comment

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

I think you can use layout_GoneMarginX attributes instead of a spacer view here. There's an example in property.xml.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, done.

@grzesiek2010
Copy link
Member Author

The buttons are no longer constrained by the size of the warning card:

Fixed.

@grzesiek2010 grzesiek2010 requested a review from seadowg May 16, 2023 15:37
<com.google.android.material.button.MaterialButton
android:id="@+id/save_as_draft"
style="@style/Widget.Material3.Button.OutlinedButton"
<androidx.constraintlayout.widget.ConstraintLayout
Copy link
Member

Choose a reason for hiding this comment

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

I think there must be a way to do this without nested ConstraintLayouts (maybe using Barrier), but it's really awkward to work out. Happy to go with this for now.

@srujner
Copy link

srujner commented May 17, 2023

Tested With Success!

Verified on device with Android 13

Verified cases:

@dbemke
Copy link

dbemke commented May 17, 2023

Tested With Success!

Verified on device with Android 10

@grzesiek2010 grzesiek2010 merged commit 0b96d5e into getodk:master May 17, 2023
6 checks passed
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.

When a control in "Access control" settings is unchecked, hide that control
4 participants