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 #4859, #4530: Images in 'li' tags display in inline rather than block mode. #5286

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

Vishwajith-Shettigar
Copy link
Collaborator

@Vishwajith-Shettigar Vishwajith-Shettigar commented Dec 23, 2023

Explanation

Fixes #4859, wrapped images inside div tag to display images in block mode.
Fixes #4530, passing (maxAvailableWidth - maxContentItemPadding) instead of passing maxAvailableWidth to calculate InitialMargin helps prevent the image from being cut off.

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

Before After
imagleik fixedroundingnumbers
WhatsApp Image 2023-12-23 at 11 53 30 AM fixed
imageliscreenshot
imageli2
tabletimageli
tabletimageli2
RTL
rtlimage

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)
  • For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

@Vishwajith-Shettigar
Copy link
Collaborator Author

@adhiamboperes, PTAL.

Copy link

oppiabot bot commented Dec 30, 2023

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Dec 30, 2023
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Dec 30, 2023
Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

Thanks @Vishwajith-Shettigar!

I am looking for more clarity on the intended solution here - the code added does not appear to directly solve the issue.

Copy link

oppiabot bot commented Jan 17, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jan 17, 2024
@oppiabot oppiabot bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jan 17, 2024
Copy link

oppiabot bot commented Jan 24, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jan 24, 2024
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jan 24, 2024
Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

Thanks @Vishwajith-Shettigar! PTAL.

Comment on lines 96 to 98
val regex = Regex("""<oppia-noninteractive-image [^>]*>.*?</oppia-noninteractive-image>""")
val modifiedHtmlContent = rawString.replace(regex) {
val oppiaImageTag = it.value
Copy link
Collaborator

Choose a reason for hiding this comment

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

DRY: This code is a duplicate of the code on line 88.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its not exactly duplicate. Regex in line no 88 makes image align explicitly using in-line CSS (Refer #5212 PR) but this doesn't.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Even so, the regex variable is a duplicate and can be extracted outside the block to be used in both places.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

okay.

@adhiamboperes adhiamboperes removed their assignment Jan 29, 2024
@oppiabot oppiabot bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Mar 9, 2024
Copy link

oppiabot bot commented Mar 16, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Mar 16, 2024
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Mar 16, 2024
Copy link

oppiabot bot commented Mar 23, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Mar 23, 2024
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Mar 23, 2024
Copy link

oppiabot bot commented Mar 30, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Mar 30, 2024
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Apr 1, 2024
Copy link

oppiabot bot commented Apr 8, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Apr 8, 2024
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Apr 8, 2024
Copy link

oppiabot bot commented Apr 15, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Apr 15, 2024
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Apr 16, 2024
Copy link

oppiabot bot commented Apr 23, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Apr 23, 2024
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Apr 23, 2024
Copy link

oppiabot bot commented Apr 30, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Apr 30, 2024
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label May 3, 2024
Copy link

oppiabot bot commented May 10, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label May 10, 2024
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label May 10, 2024
Copy link

oppiabot bot commented May 17, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label May 17, 2024
@Vishwajith-Shettigar Vishwajith-Shettigar removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label May 19, 2024
Copy link

oppiabot bot commented May 26, 2024

Hi @Vishwajith-Shettigar, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Corresponds to items that haven't seen a recent update and may be automatically closed.
Projects
None yet
2 participants