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

Custom Weather: Text and Links #3314

Merged
merged 6 commits into from
May 18, 2020
Merged

Conversation

rajadain
Copy link
Member

@rajadain rajadain commented May 16, 2020

Overview

Wires up the sample CSV file to be downloaded. It is now also used in testing, to store fewer CSV files in the repo, and to also validate our sample against our own rules.

Adds real text to the weather upload modal. May receive further tweaks from the client. Also makes clear that uploads need to be in centimeters and Celsius (the numbers themselves are not validated).

Also updates the scenario sidebar to report the correct number of years based on the custom weather file.

See commit messages for details.

Connects #3308
Connects #3310

Demo

Updated text:

image

Updated weather information in sidebars:

image

image

image

Testing Instructions

  • Check out this branch and bundle --debug --vendor
    • The vendor flag is required to get the new sample CSV in place as a static resource
  • Create a MapShed project and add changes to it
  • Open the Weather Data dialog
    • Ensure it has updated text in it
    • Ensure the links open in new tabs and work correctly
  • Upload a custom weather file. Click "Save".
  • Observe the Hydrology and Water Quality tabs on the left
    • Ensure you see a line saying "Source: $YOUR_WEATHER_FILE"
    • Ensure the title reflects the correct number of years of weather data

The sample CSV is bolstered to have 5 years of values, and be
something that would pass our validations. It's provenance is
`phillyRCP4520802100daily.csv` from Scott Ensign's Future
Weather dataset, with 2080 replaced with 2000.

Furtheremore, we now reuse it for our testing. This reduces
repetition of CSV files in the repository, and ensures that
the sample CSV is valid.

It is a little unusual to use static files for testing, but
they are placed in the right place in the VM during provisioning,
so it works.
This may potentially go through some revision from the clients.

Refs #3308
Copy link
Contributor

@mmcfarland mmcfarland left a comment

Choose a reason for hiding this comment

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

Looks great. I found one rendering quirk and one existing UI quirk that you may want to drive-by fix:

After uploading a CWD file, the Source: $MY_FILE text on the Hydrology tab renders as Source: false before re-rendering correctly. It's brief, but noticeable (and doesn't happen after uploading subsequent to a delete)

mmw-cdw-false

The existing UI quirk is that the (i) popup targets for Hydrology and Water Quality are rendered in different colors. Elsewhere in the app, they are only rendered in black.

image

I don't think fixing either of these quirks are critical, but could be addressed if timing/resources permit.

@mmcfarland mmcfarland assigned rajadain and unassigned mmcfarland May 17, 2020
@rajadain
Copy link
Member Author

Good catch on the Source: false. Fixed in 8e3a1f7.

2020-05-17 21 15 34

@rajadain
Copy link
Member Author

rajadain commented May 18, 2020

Tooltip color fixed in 4330e28.

image

The previously used .black class was not specified anywhere,
instead other targeting was used for the coloring of the icons,
which was not consistently applied everywhere.

By adding a utility class of .black-74 and using that, we
ensure that all tooltip info icons have the same color.
@rajadain rajadain force-pushed the tt/custom-weather-text-links branch from 747bb45 to 4330e28 Compare May 18, 2020 01:26
@rajadain
Copy link
Member Author

Thanks for reviewing! Merging this now.

@rajadain rajadain merged commit 875249e into develop May 18, 2020
@rajadain rajadain deleted the tt/custom-weather-text-links branch May 18, 2020 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Custom Weather Data OSI Funding Source: OSI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants