Skip to content

Conversation

@navinkarkera
Copy link
Contributor

@navinkarkera navinkarkera commented Apr 12, 2025

Sets minimum height of library block previews based on its render
location and block type.

Ref: openedx/openedx-platform#36477 (comment)
Private-ref: https://tasks.opencraft.com/browse/FAL-4049

Screenshots:

With large fixed size min-height, all blocks in unit page look big

Fixed-size

After:

Auto-adjust-size

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 12, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented Apr 12, 2025

Thanks for the pull request, @navinkarkera!

This repository is currently maintained by @openedx/2u-tnl.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Apr 12, 2025
@navinkarkera navinkarkera marked this pull request as ready for review April 12, 2025 06:06
Comment on lines +28 to +34
const LARGE_COMPONENTS = [
COMPONENT_TYPES.advanced,
COMPONENT_TYPES.dragAndDrop,
COMPONENT_TYPES.discussion,
'lti',
'lti_consumer',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ChrisChV We just need to add block types that need larger min height, let me know if I missed any.

Copy link
Contributor

Choose a reason for hiding this comment

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

@navinkarkera For the previews those are fine 👍

@navinkarkera navinkarkera requested a review from ChrisChV April 12, 2025 06:12
@navinkarkera navinkarkera changed the title fix: auto adjust min height of xblock previews fix: auto adjust min height of xblock previews [FC-0083] Apr 12, 2025
@codecov
Copy link

codecov bot commented Apr 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.56%. Comparing base (6818542) to head (55d3af7).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1813      +/-   ##
==========================================
+ Coverage   93.55%   93.56%   +0.01%     
==========================================
  Files        1136     1136              
  Lines       23245    23247       +2     
  Branches     5013     5013              
==========================================
+ Hits        21746    21751       +5     
+ Misses       1423     1420       -3     
  Partials       76       76              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@navinkarkera navinkarkera force-pushed the navin/fal-4049/size-fix branch from 4b8ff19 to aa51f80 Compare April 12, 2025 06:18
@mphilbrick211 mphilbrick211 added the FC Relates to an Axim Funded Contribution project label Apr 14, 2025
@ChrisChV
Copy link
Contributor

@navinkarkera With this PR, I see the exact size issue for editors: Completion, PDF and LTI Consumer

https://www.loom.com/share/9f941ffc0b8b48a3a37ffe41e0bf2147?sid=01438a5f-a701-4c48-a76a-e94c52e72ac5

@navinkarkera navinkarkera force-pushed the navin/fal-4049/size-fix branch from 2a92a0d to bb3a9b7 Compare April 14, 2025 16:35
@navinkarkera
Copy link
Contributor Author

@ChrisChV Ahh, good catch! I missed adding min-height to some instances of LibraryBlock. Updated here: bb3a9b7

@navinkarkera navinkarkera force-pushed the navin/fal-4049/size-fix branch from bb3a9b7 to 5a3f390 Compare April 14, 2025 16:47
Copy link
Contributor

@ChrisChV ChrisChV left a comment

Choose a reason for hiding this comment

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

@navinkarkera Thanks! Looks good! Could you fix the coverage to merge this PR?

@mphilbrick211 mphilbrick211 moved this from Needs Triage to In Eng Review in Contributions Apr 14, 2025
Sets minimum height of library block previews based on its render
location and block type.
@navinkarkera navinkarkera force-pushed the navin/fal-4049/size-fix branch from 5a3f390 to 55d3af7 Compare April 15, 2025 06:01
@navinkarkera
Copy link
Contributor Author

@ChrisChV Done.

@ChrisChV ChrisChV merged commit 87695ae into openedx:master Apr 15, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from In Eng Review to Done in Contributions Apr 15, 2025
@ChrisChV ChrisChV deleted the navin/fal-4049/size-fix branch April 15, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants