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

Clean up dialogs #6661

Merged
merged 3 commits into from
Sep 16, 2024
Merged

Conversation

Pururun
Copy link
Contributor

@Pururun Pururun commented Aug 22, 2024

Clean up task:

  • Moved all infodialogs into their own package ot make the dialog package.
  • Made some more dialogs use DeleteConfirmationDialog
  • Renamed DeleteConfirmationDialog to NegativeConfirmationDialog
  • Added support for AnnotatedString to NegativeConfirmationDialog
  • Removed HtmlText as the last instance where it was used was replaced with AnnotatedString
  • Added InputDialog and made all input dialogs except redeem voucher dialog use it.

This change is Reviewable

@Pururun Pururun added the Android Issues related to Android label Aug 22, 2024
@Pururun Pururun requested a review from albin-mullvad August 22, 2024 13:25
Copy link

linear bot commented Aug 22, 2024

Copy link
Collaborator

@albin-mullvad albin-mullvad left a comment

Choose a reason for hiding this comment

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

Reviewed 17 of 25 files at r1, all commit messages.
Reviewable status: 17 of 25 files reviewed, 1 unresolved discussion (waiting on @Pururun)


-- commits line 5 at r1:
typo: dialogs

Code quote:

dialog

@Pururun Pururun force-pushed the create-base-component-for-error-dialog-droid-1250 branch 3 times, most recently from 3497938 to f20b403 Compare August 26, 2024 12:23
@Pururun Pururun force-pushed the create-base-component-for-error-dialog-droid-1250 branch from f20b403 to 0efa5e6 Compare August 30, 2024 14:42
@Pururun Pururun mentioned this pull request Sep 3, 2024
3 tasks
Copy link
Contributor

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 25 files at r1, 22 of 22 files at r4, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @Pururun)


android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt line 50 at r4 (raw file):

fun NegativeConfirmationDialog(
    message: String,
    messageStyle: TextStyle? = null,

Shouldn't these be the same for all NegativeConfrimationDialog? Or when do we change the message style? I saw the NoEmail for error report seems to have a different style.


android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt line 51 at r4 (raw file):

    message: String,
    messageStyle: TextStyle? = null,
    errorMessage: String?,

Maybe null as default? Then we don't have to define it on the call side if it does not have a message.

@Pururun Pururun force-pushed the create-base-component-for-error-dialog-droid-1250 branch 2 times, most recently from 5f5ec68 to 4750d20 Compare September 6, 2024 08:47
Copy link
Contributor Author

@Pururun Pururun left a comment

Choose a reason for hiding this comment

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

Reviewable status: 16 of 25 files reviewed, 3 unresolved discussions (waiting on @Rawa)


android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt line 50 at r4 (raw file):

Previously, Rawa (David Göransson) wrote…

Shouldn't these be the same for all NegativeConfrimationDialog? Or when do we change the message style? I saw the NoEmail for error report seems to have a different style.

It is used by NoEmail and RemoveDevice. In the case of no email it is because the text is quite long, in the case of remove device it is because it has some text that is bold so the normal text needs to be non-bold.


android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt line 51 at r4 (raw file):

Previously, Rawa (David Göransson) wrote…

Maybe null as default? Then we don't have to define it on the call side if it does not have a message.

Done.

@Pururun Pururun force-pushed the create-base-component-for-error-dialog-droid-1250 branch 3 times, most recently from 2e15105 to 36a5b29 Compare September 9, 2024 06:06
Copy link
Contributor Author

@Pururun Pururun left a comment

Choose a reason for hiding this comment

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

Reviewable status: 16 of 26 files reviewed, 3 unresolved discussions (waiting on @Rawa)


android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/NegativeConfirmationDialog.kt line 50 at r4 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

It is used by NoEmail and RemoveDevice. In the case of no email it is because the text is quite long, in the case of remove device it is because it has some text that is bold so the normal text needs to be non-bold.

I tested a few different configuration for this and I think we should keep it as is and then look into it again when we look into fonts and text styles.

Rawa
Rawa previously approved these changes Sep 10, 2024
Copy link
Contributor

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

Reviewed 8 of 9 files at r5, 1 of 1 files at r6, 1 of 1 files at r7, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Pururun)

@Pururun Pururun force-pushed the create-base-component-for-error-dialog-droid-1250 branch from 36a5b29 to f06532c Compare September 10, 2024 09:21
@Pururun Pururun force-pushed the create-base-component-for-error-dialog-droid-1250 branch 3 times, most recently from 818530e to dbc0f2d Compare September 10, 2024 13:35
Copy link
Contributor

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@Pururun Pururun force-pushed the create-base-component-for-error-dialog-droid-1250 branch from dbc0f2d to d7394d0 Compare September 16, 2024 08:35
@Rawa Rawa merged commit 30202d8 into main Sep 16, 2024
24 checks passed
@Rawa Rawa deleted the create-base-component-for-error-dialog-droid-1250 branch September 16, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues related to Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants