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: Optimize collections listing [PT-185588012] #1206

Merged
merged 2 commits into from
Jul 24, 2023

Conversation

dougmartin
Copy link
Member

This change is to optimize the materials collection rendering when used on large collection pages like the NGSS Assessment Portal.

Here are the changes that were made:

  • Styled Landing page content html textarea on the projects admin page to be full width, and taller and to use a monospace font. Previously it was a standard unstyled textarea. This just makes viewing and editing it easier.
  • Added optional opacity animation setting to existing cleanUpAssignViewAdjustment function in langing_page.html.haml. This was a request to ensure the content was visible when the each NGSS content area was revealed.
  • Added a public loadMaterialsCollections() method which caches the results for later use in renderMaterialsCollection(). The api endpoint already supported getting multiple collections.
  • Fixes a race condition between the MaterialsCollection onDataLoad callback prop and the initial mount of the component. The existing code in the project landing pages assumes the component is mounted.

This change is to optimize the materials collection rendering when used on large collection pages like the NGSS Assessment Portal.

Here are the changes that were made:

- Styled Landing page content html textarea on the projects admin page to be full width, and taller and to use a monospace font.  Previously it was a standard unstyled textarea.  This just makes viewing and editing it easier.
- Added optional opacity animation setting to existing cleanUpAssignViewAdjustment function in langing_page.html.haml.  This was a request to ensure the content was visible when the each NGSS content area was revealed.
- Added a public loadMaterialsCollections() method which caches the results for later use in renderMaterialsCollection().  The api endpoint already supported getting multiple collections.
- Fixes a race condition between the MaterialsCollection onDataLoad callback prop and the initial mount of the component.  The existing code in the project landing pages assumes the component is mounted.
@dougmartin dougmartin requested a review from emcelroy July 24, 2023 15:17
Copy link
Contributor

@emcelroy emcelroy left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

Good call on the landing page content html textarea styling. We should've done that a long time ago. If it's not too much trouble, maybe do the same for the textareas in the following?

  • rails/app/views/admin/settings/_home_page_content_field.html.haml
  • rails/app/views/admin/settings/_help_page_item.html.haml
  • rails/app/views/admin/settings/_about_page_content_field.html.haml

Definitely not required, though, if you don't have the time.

@dougmartin
Copy link
Member Author

@emcelroy I updated the requested pages with a common class to fix the content editor styling here: e4347fe

@emcelroy
Copy link
Contributor

@emcelroy I updated the requested pages with a common class to fix the content editor styling here: e4347fe

Looks great -- thanks!

@dougmartin dougmartin merged commit d88f763 into master Jul 24, 2023
9 checks passed
@dougmartin dougmartin deleted the 185588012-optimize-collections-listing branch July 24, 2023 17:35
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.

2 participants