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

Add device name and time left to main view #5256

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

Rawa
Copy link
Contributor

@Rawa Rawa commented Oct 10, 2023

Adds the device name and time left to the main view.


This change is Reviewable

@linear
Copy link

linear bot commented Oct 10, 2023

DROID-90 Add device name and time left to main view

Some users have sent emails to support saying that they do not understand the device name concept, see discussion in Slack here. It was decided that having the device name be shown in the main view and adding info buttons with dialogs explaining the device concept could mitigate this. To also give users some more information about their new device an in-app banner message appears upon login that users need to close manually.

Note: The Confluence and Zeplin links references other work as well, for instance the Project Better inform users about time left on account


Confluence: https://mullvad.atlassian.net/l/cp/1tRhWft7

Zeplin: https://zpl.io/noZAypY

@Rawa Rawa added the Android Issues related to Android label Oct 10, 2023
@Rawa Rawa self-assigned this Oct 10, 2023
@Rawa Rawa changed the title Add device name and time left to main view droid 90 Add device name and time left to main view Oct 10, 2023
Copy link
Contributor

@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.

Reviewed 57 of 57 files at r1, 1 of 5 files at r2, all commit messages.
Reviewable status: 57 of 61 files reviewed, 2 unresolved discussions (waiting on @Rawa)


android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt line 293 at r2 (raw file):

            horizontalArrangement = Arrangement.spacedBy(Dimens.mediumPadding)
        ) {
            Text(

So if the device name is either null or empty this will show as "Device name:". So I wonder if it would be better to just not show device name at all in that case or if that would break?


android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/AccountExpiry.kt line 12 at r1 (raw file):

    @Parcelize
    data class Available(val expiryDateTime: DateTime) : AccountExpiry() {
        override fun daysLeft(): Int =

This perhaps could be a more generic extension function for DateTime?

Copy link
Contributor

@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.

Reviewed 4 of 5 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Rawa)

@Rawa Rawa force-pushed the add-device-name-and-time-left-to-main-view-droid-90 branch 2 times, most recently from b40c461 to 6414606 Compare October 11, 2023 09:58
Copy link
Contributor Author

@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.

Reviewable status: 36 of 63 files reviewed, 2 unresolved discussions (waiting on @Pururun)


android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt line 293 at r2 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

So if the device name is either null or empty this will show as "Device name:". So I wonder if it would be better to just not show device name at all in that case or if that would break?

It would certainly work, I'd like us to use maybe something like "placeholder" in this case:
https://google.github.io/accompanist/placeholder/ . I think shimmer is a pretty easily applied affect to hind that the data is loading.

But that should then be aligned with the rest of the team and design before we apply something like that.

I've removed "Device name:" until the text have been loaded now, reason for still rendering the Text it self it to prevent "Time Left" to take it's place.


android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/AccountExpiry.kt line 12 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

This perhaps could be a more generic extension function for DateTime?

👍 Agree. Fixed.

@Rawa Rawa force-pushed the add-device-name-and-time-left-to-main-view-droid-90 branch from 6414606 to 1710288 Compare October 11, 2023 14:52
Copy link
Contributor

@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.

Reviewed 1 of 1 files at r3, 26 of 26 files at r4, 19 of 19 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Rawa)


android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt line 293 at r2 (raw file):

Previously, Rawa (David Göransson) wrote…

It would certainly work, I'd like us to use maybe something like "placeholder" in this case:
https://google.github.io/accompanist/placeholder/ . I think shimmer is a pretty easily applied affect to hind that the data is loading.

But that should then be aligned with the rest of the team and design before we apply something like that.

I've removed "Device name:" until the text have been loaded now, reason for still rendering the Text it self it to prevent "Time Left" to take it's place.

I think it is at least something we should raise since it is something that is happening some times in the current implementation.

@Rawa Rawa force-pushed the add-device-name-and-time-left-to-main-view-droid-90 branch from 1710288 to 28cb140 Compare October 12, 2023 07:47
Copy link
Contributor

@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.

:lgtm:

Reviewed all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Rawa)

@Rawa Rawa force-pushed the add-device-name-and-time-left-to-main-view-droid-90 branch 4 times, most recently from db773f9 to 8bd8073 Compare October 13, 2023 08:33
Copy link
Contributor

@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.

:lgtm:

Reviewed 3 of 3 files at r7, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Rawa)

Copy link
Contributor

@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: :shipit: complete! all files reviewed, all discussions resolved

@Pururun Pururun force-pushed the add-device-name-and-time-left-to-main-view-droid-90 branch from 8bd8073 to e72415c Compare October 13, 2023 09:04
@Pururun Pururun merged commit 6842d20 into main Oct 13, 2023
12 checks passed
@Pururun Pururun deleted the add-device-name-and-time-left-to-main-view-droid-90 branch October 13, 2023 09:05
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.

2 participants