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

Feature/555 add cyan to overview #872

Merged
merged 4 commits into from
Jul 25, 2023

Conversation

maxdiebold-erg
Copy link
Collaborator

@maxdiebold-erg maxdiebold-erg commented Jul 21, 2023

Related Issues:

Main Changes:

  • Added CyAN content to the Community page's Overview tab.
  • Added a ResizeObserver to the VirtualizedList component to address rows with dynamically-sized content.
  • Fixed some style issues in the popups.
  • Changed the text 'CyAN Satellite Imagery' to 'Harmful Algal Blooms (HABs)'.

Steps To Test:

  1. Navigate to http://localhost:3000/community/lake%20okeechobee/overview.
  2. Open the Water Monitoring Locations tab, and confirm that the CyAN layer toggles on (and is visible), along with the other monitoring layers.
  3. Expand the Lake Okeechobee CyAN list item, and confirm that all content is visible without scrolling in the accordion item.
  4. Confirm the proper text changes were made in this tab and in the "Current Water Conditions" of the Water Monitoring tab.

TODO:

  • We should wait to hear back about the proper text changes before merging this in. While the email states the change should be "Harmful Algal Blooms (HABs)", "Potentially Harmful Algal Blooms (HABs)" was discussed in a recent meeting, along with other potential changes.

Copy link
Collaborator

@cschwinderg cschwinderg left a comment

Choose a reason for hiding this comment

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

I'm seeing some rendering issues with the ResizeObserver. On smaller screens (1000px X 720px) a scrollbar is shown for the accordion headers. Also, I'm seeing a lot of flickering (gif below) on smaller screens (1000px X 720px). It seems like removing , overflowX: 'hidden' from line 120 of VirtualizedList.tsx fixes the issue.

What was the issue the ResizeObserver is intended to fix? I'm assuming it is just to move away from reach-ui.

renderingIssue

An unrelated issue, the pageYOffset (used on line 89 of the VirtualizedList.tsx file) value has been deprecated. We should switch to scrollY.

@maxdiebold-erg
Copy link
Collaborator Author

The ResizeObserver is for properly resizing when asynchronous content is loaded inside the virtualized list (i.e. the CyAN content). Otherwise, the expanded list items will have the height that is calculated when loading spinners are visible.

It looks like react-window was working on similar functionality with the DynamicSizeList (bvaughn/react-window#516) class, but ran into issues. Other similar packages (e.g. React Virtuoso) use ResizeObserver under the hood.

Good catch on that overflow issue, I'll make those changes.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Collaborator

@cschwinderg cschwinderg left a comment

Choose a reason for hiding this comment

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

Thank you for making those changes. The switch to using ResizeObserver makes sense.

I'm going to go ahead and merge this in. Kiki can let us know what she thinks of the new HABs text during our next meeting.

@cschwinderg cschwinderg merged commit 2deaeae into develop Jul 25, 2023
@cschwinderg cschwinderg deleted the feature/555_add-cyan-to-overview branch July 25, 2023 12:04
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