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

Fix part of #3258 : Replacing CircularImageView with ShapeableImageView #4139

Closed

Conversation

bhaktideshmukh
Copy link
Contributor

@bhaktideshmukh bhaktideshmukh commented Jan 28, 2022

Explanation

Fix part of #3258 : Replacing CircularImageView with ShapeableImageView.

Screenshots

Phone portrait mode

Before After

Phone landscape mode

Before After

Tablet portrait mode

Before After

Tablet landscape mode

Before After

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

If your PR includes UI-related changes, then:

  • Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
  • For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
  • Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

@bhaktideshmukh
Copy link
Contributor Author

PTAL @BenHenning
Thanks.

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @bhaktideshmukh! Apologies for the delayed review.

I just took a first pass--PTAL. I also think that you have failing tests. Please make sure that affected tests are passing (I think one of my comments will help with this).

@@ -33,7 +33,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<de.hdodenhof.circleimageview.CircleImageView
<com.google.android.material.imageview.ShapeableImageView
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

This & later changes don't require the appearance overlay property to be set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the appearance overlay property here.

@@ -459,4 +459,9 @@
<item name="android:gravity">center_horizontal</item>
</style>

<!-- ShapeableImageView -->
<style name="ShapeAppearanceOverlay.App.Circular" parent="">
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I believe you can omit parent if it isn't defined.

@@ -459,4 +459,9 @@
<item name="android:gravity">center_horizontal</item>
</style>

<!-- ShapeableImageView -->
<style name="ShapeAppearanceOverlay.App.Circular" parent="">
<item name="cornerSize">50%</item>
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Is there documentation that you can point to explaining this property?

Also, I'm not sure about the style & item names (both in terms of formatting consistency and the way the style name is broken up). @rt4914 what are your thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Given other styles names that we have like
TextInputLayout,
TextInputEditText,
AppTabTextAppearance

I think ShapeableImageView.Circular can be a good name because it clearly mentions where to use this theme (ShapeableImageView) and also what will be the output of the theme (Circular).

app/build.gradle Show resolved Hide resolved
@BenHenning
Copy link
Sponsor Member

Also @rt4914 I noticed in the screenshots that the 'add profile' button isn't aligned with the others--is this a recent regression?

@bhaktideshmukh
Copy link
Contributor Author

PTAL @BenHenning
Thanks

@oppiabot oppiabot bot assigned BenHenning and unassigned bhaktideshmukh Feb 1, 2022
@oppiabot
Copy link

oppiabot bot commented Feb 1, 2022

Unassigning @bhaktideshmukh since a re-review was requested. @bhaktideshmukh, please make sure you have addressed all review comments. Thanks!

@rt4914
Copy link
Contributor

rt4914 commented Feb 2, 2022

Also @rt4914 I noticed in the screenshots that the 'add profile' button isn't aligned with the others--is this a recent regression?

@BenHenning Its a known issue, mentioned in #2116

Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

@bhaktideshmukh Please rename the PR title and description to mention ``Fix part of #instead ofFix #...` because once this PR is approved you will need to do similar changes in other places too like `ProfileProgress`, `ProfileList`, `ProfileEdit` and in last you will need to remove the existing `CircularImageView` library mentioned in the issue.

@rt4914
Copy link
Contributor

rt4914 commented Feb 2, 2022

@bhaktideshmukh Please add screenshot of MDPIP device and API 21 too.

@rt4914 rt4914 assigned bhaktideshmukh and unassigned rt4914 Feb 2, 2022
@bhaktideshmukh bhaktideshmukh changed the title Fix #3258 : Replacing CircularImageView with ShapeableImageView Fix part of #3258 : Replacing CircularImageView with ShapeableImageView Feb 2, 2022
@bhaktideshmukh
Copy link
Contributor Author

@bhaktideshmukh Please rename the PR title and description to mention ``Fix part of #instead ofFix #...` because once this PR is approved you will need to do similar changes in other places too like `ProfileProgress`, `ProfileList`, `ProfileEdit` and in last you will need to remove the existing `CircularImageView` library mentioned in the issue.

Done!

@bhaktideshmukh
Copy link
Contributor Author

@bhaktideshmukh Please add screenshot of MDPIP device and API 21 too.

Here for MDPI API 21 is not available.
The least level here starts with 22.
So what should I do?
Should I add the screenshot for API 22?

Screenshot from 2022-02-02 20-11-44

@bhaktideshmukh
Copy link
Contributor Author

@rt4914 PTAL
Thanks

@oppiabot oppiabot bot assigned rt4914 and unassigned bhaktideshmukh Feb 2, 2022
@oppiabot
Copy link

oppiabot bot commented Feb 2, 2022

Unassigning @bhaktideshmukh since a re-review was requested. @bhaktideshmukh, please make sure you have addressed all review comments. Thanks!

@rt4914
Copy link
Contributor

rt4914 commented Feb 3, 2022

@bhaktideshmukh Please add screenshot of MDPIP device and API 21 too.

Here for MDPI API 21 is not available. The least level here starts with 22. So what should I do? Should I add the screenshot for API 22?

Screenshot from 2022-02-02 20-11-44

@bhaktideshmukh Select the second tab which is x86 images in that you will find the 21 version.

@bhaktideshmukh
Copy link
Contributor Author

MDPI device and API 21

Phone portrait mode

Before After

Phone landscape mode

Before After

@bhaktideshmukh
Copy link
Contributor Author

@bhaktideshmukh Please add screenshot of MDPIP device and API 21 too.

Done!!

@bhaktideshmukh
Copy link
Contributor Author

bhaktideshmukh commented Feb 3, 2022

PTAL @rt4914
Thanks.

@BenHenning
Copy link
Sponsor Member

Apologies @bhaktideshmukh but I'll need to close this since you force pushed the branch. Please open a new PR.

In the future, you should never force push as it can break comment history. See step 3 under https://github.com/oppia/oppia-android/wiki/Making-a-code-change#making-a-code-change-using-the-terminal (though I suggest reviewing all those instructions to make sure you know our process).

Once the PR is recreated, we can take another review pass on it.

@BenHenning BenHenning closed this Feb 4, 2022
@bhaktideshmukh
Copy link
Contributor Author

Apologies @bhaktideshmukh but I'll need to close this since you force pushed the branch. Please open a new PR.

In the future, you should never force push as it can break comment history. See step 3 under https://github.com/oppia/oppia-android/wiki/Making-a-code-change#making-a-code-change-using-the-terminal (though I suggest reviewing all those instructions to make sure you know our process).

Once the PR is recreated, we can take another review pass on it.

I apologize for my mistake. I read the instructions.
I have also recreated the PR for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants