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

feat: allow full width content in library authoring [FC-0062] #1258

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rpenido
Copy link
Contributor

@rpenido rpenido commented Sep 5, 2024

Description

This PR allows the library authoring home to go full-width to better fit the content.

Before:

image

After:

image

Responsiveness:

library-authoring-responsiveness

More information

Part of:

Depends on:

Testing instructions

  • Checkout this branch and run npm install --legacy-peer-deps to ignore the peer-deps conflicts and make sure you have the correct dependencies
  • If you experience Module not found webpack errors, it might be due to dependency cache issues. Run npm run build, and restart tutor.
  • Open the library authoring page for a library with some components
  • Resize the screen and check the responsiveness

Private ref: FAL-3820

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 5, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @rpenido!

What's next?

Please work through the following steps to get your changes 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.

🔘 Update the status of your PR

Your PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/2u-tnl. Tag them in a comment and let them know that your changes are ready for review.

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.

@rpenido rpenido force-pushed the rpenido/fal-3820-allow-full-width-content branch from b6e58d4 to 491bc7a Compare September 5, 2024 23:53
@rpenido rpenido changed the title feat: allow full width content in library authoring feat: allow full width content in library authoring [FC-0062] Sep 6, 2024
Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

@rpenido I've only done a code review (npm is taking its sweet time 😄 ), but left some comments for you here and on the related PRs.

package.json Outdated
@@ -63,7 +63,7 @@
"@openedx-plugins/course-app-wiki": "file:plugins/course-apps/wiki",
"@openedx-plugins/course-app-xpert_unit_summary": "file:plugins/course-apps/xpert_unit_summary",
"@openedx/frontend-plugin-framework": "^1.2.1",
"@openedx/paragon": "^22.5.1",
"@openedx/paragon": "git+ssh://github.com/open-craft/paragon#0e0a66a794fbb6ccf61f7afa9264e096f132cd1b",
Copy link
Contributor

Choose a reason for hiding this comment

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

This commit hash doesn't match openedx/paragon#3216 :

Suggested change
"@openedx/paragon": "git+ssh://github.com/open-craft/paragon#0e0a66a794fbb6ccf61f7afa9264e096f132cd1b",
"@openedx/paragon": "git+ssh://github.com/open-craft/paragon#4a206aec3227fe3f6b8e00d93035a4563b251d3a",

Copy link
Contributor Author

@rpenido rpenido Sep 6, 2024

Choose a reason for hiding this comment

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

The problem here is that our build system is not building git dependencies. So, I created another branch (https://github.com/open-craft/paragon/tree/rpenido/dist/fal-3820-add-full-width-container-option) with the component built (with the dist folder) to link here. I don't know how we can handle it better.

Also, I think this is why we are having dependency conflicts. Locally, we solve it with --legacy-peer-deps, but I can't make the CI run.

package.json Outdated
@@ -47,8 +47,8 @@
"@dnd-kit/sortable": "^8.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.3",
"@edx/frontend-component-footer": "^14.0.3",
"@edx/frontend-component-header": "^5.3.3",
"@edx/frontend-component-footer": "git+ssh://github.com/open-craft/frontend-component-footer#335ad6d0b09b868bced3f9988dd355666e54a50c",
Copy link
Contributor

Choose a reason for hiding this comment

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

This commit hash doesn't match openedx/frontend-component-footer#463:

Suggested change
"@edx/frontend-component-footer": "git+ssh://github.com/open-craft/frontend-component-footer#335ad6d0b09b868bced3f9988dd355666e54a50c",
"@edx/frontend-component-footer": "git+ssh://github.com/open-craft/frontend-component-footer#3b9230d7eadc12b4a9db01898b05e56303ae181b",

package.json Outdated
"@edx/frontend-component-footer": "^14.0.3",
"@edx/frontend-component-header": "^5.3.3",
"@edx/frontend-component-footer": "git+ssh://github.com/open-craft/frontend-component-footer#335ad6d0b09b868bced3f9988dd355666e54a50c",
"@edx/frontend-component-header": "git+ssh://github.com/open-craft/frontend-component-header#8aefc103cbe8ba59b1df96bf0aa3bce406b6d38e",
Copy link
Contributor

Choose a reason for hiding this comment

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

This commit hash doesn't match openedx/frontend-component-header#529:

Suggested change
"@edx/frontend-component-header": "git+ssh://github.com/open-craft/frontend-component-header#8aefc103cbe8ba59b1df96bf0aa3bce406b6d38e",
"@edx/frontend-component-header": "git+ssh://github.com/open-craft/frontend-component-header#6ede5ee13d89b3fb6e7da1ec0f2f2c588016a51b",

src/header/Header.tsx Outdated Show resolved Hide resolved
src/library-authoring/components/LibraryComponents.tsx Outdated Show resolved Hide resolved
src/library-authoring/components/LibraryComponents.scss Outdated Show resolved Hide resolved
src/index.scss Outdated Show resolved Hide resolved
Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

👍 Works beautifully, thank you @rpenido !

  • I tested this on my tutor devstack using the latest commit hashes from the dependent PRs, and the PR test instructions.
  • I read through the code
  • I checked for accessibility issues N/A
  • Includes documentation N/A
  • User-facing strings are extracted for translation N/A

@ChrisChV
Copy link
Contributor

@rpenido I don't know if this is on the scope of this task, but when the description of a component is large, then it causes a disparity in sizes:

Captura desde 2024-09-18 13-28-13

@rpenido rpenido force-pushed the rpenido/fal-3820-allow-full-width-content branch from d118adb to bb12eca Compare September 18, 2024 22:51
@rpenido
Copy link
Contributor Author

rpenido commented Sep 19, 2024

Hi @ChrisChV! This is fixed now!

@rpenido rpenido force-pushed the rpenido/fal-3820-allow-full-width-content branch from bb12eca to 95acaaf Compare September 19, 2024 20:56
@rpenido rpenido force-pushed the rpenido/fal-3820-allow-full-width-content branch from 95acaaf to 99da9c7 Compare September 19, 2024 21:05
Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

One nit and one suggestion (which can go to the CCs if you're unsure), but this is working well @rpenido . Thank you for taking the time to improve the frontend component repos too!

👍

  • I tested this on a library with many components. Checked that the card heights remain constant (with nit fixed), they occupy the whole screen, and are smoothly responsive as page with changes.
  • I read through the code
  • I checked for accessibility issues N/A
  • Includes documentation N/A
  • User-facing strings are extracted for translation N/A

@@ -69,8 +73,9 @@ const Header = ({
mainMenuDropdowns={mainMenuDropdowns}
outlineLink={outlineLink}
searchButtonAction={meiliSearchEnabled ? openSearchModal : undefined}
containerProps={containerProps}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we actually want different pages/sections of this Authoring app to show a differently-sized header? This is probably a question for the CCs with oversight over the whole app, but I would think it's better to have these params here, and remove the containerProps from this Header class, so other pages don't mess with them.

Suggested change
containerProps={containerProps}
containerProps={{
size: undefined,
}}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we actually want different pages/sections of this Authoring app to show a differently-sized header?

The idea came from here: #1221 (comment)
And there is a previous discussion here: #1217 (comment)
Personally, I prefer consistency throughout the app. But we would definitely use the extra space in the library authoring, and maybe changing everything would be a too big step.

src/library-authoring/components/ComponentCard.scss Outdated Show resolved Hide resolved
Co-authored-by: Jillian <[email protected]>
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
Status: Waiting on Author
Development

Successfully merging this pull request may close these issues.

5 participants