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

Admins can preview pollen calendar #101

Merged
merged 27 commits into from
May 5, 2024
Merged

Commits on Apr 29, 2024

  1. showing preview of graph 📊📊📉📉😀😀🙌

    without any filtering ability yet
    arnard76 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    ee4a5a2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f27107 View commit details
    Browse the repository at this point in the history
  3. add date filter to pollen calendar

    plus refactor code a bit
    arnard76 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    10db463 View commit details
    Browse the repository at this point in the history
  4. styling and cleaner layout 🧚🧚

    - only show assumptions if there are errors related to parsing.
    arnard76 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    57e7c69 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    31094fb View commit details
    Browse the repository at this point in the history
  6. improve e2e tests 🧪🧪👌

    no valid sheets would result in app crashing, somade  e2e test for that and fixed it
    arnard76 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    05e188d View commit details
    Browse the repository at this point in the history
  7. configure visual e2e testing

    e.g. if pollen calendar looks drastically different, then test will fail.
    
    for this example, the way to solve it would fix bug that was ruining calendar OR if it is an improvement to calendar, update the snapshots in `cypress/snapshots/base/<testfilename>/<snapshotname>`
    
    followed the `readme` of the package to setup ☝️
    https://github.com/cypress-visual-regression/cypress-visual-regression
    arnard76 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    ce94cdb View commit details
    Browse the repository at this point in the history
  8. add visual test for pollen calendar preview

    - can be used for the pollen calendar on `/pollen` page that user sees too
    arnard76 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    a4fc823 View commit details
    Browse the repository at this point in the history
  9. bug🐛🐛: couldn't see 0 values on line graph

    why?
    0 has boolean value false so formatting data function was getting rid of those values
    
    fix 🛠️
    only get rid of undefined values (as on those dates, no pollen value was recorded)
    arnard76 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    bef7a50 View commit details
    Browse the repository at this point in the history
  10. only rerender pollen calendar and multichart IF their props change

    - noticeable when clicking the filter buttons, the multichart would keep refreshing even tho the data hasn't changed yet
    arnard76 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    5f9f11f View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. bug 🐛🐛: using date filter makes charts have weird offset 😬🤢🤢

    when changing the date period using the date filter, the last bar or line points on the chart is offsetted by 50%.
    
    why?
    when changing the date period using the date filter, the timestamp generated for the date would have time midday.
    
    fix 🧑‍⚕️🧑‍⚕️
    changing the date timestamp to have time of 00:00:00 (which is either midnight at the start of day or midnight at the end, idk)
    
    no more weird offset
    arnard76 committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    6ad7ae5 View commit details
    Browse the repository at this point in the history
  2. simplify the two seperate y-axes into one

    using the stack property to stack the bars only not the lines.
    
    this is great because we don't have to manually set the max and min for each axis. and when
    
    setting suggested min and max because if there is pollen values are all at 0, it should be obvious that the chart can go higher than 0 but the value was low. SORRY soooper confusing explanation, definitely easier to show.
    arnard76 committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    16aa0d4 View commit details
    Browse the repository at this point in the history
  3. bug🐛🐛: for each line in the line graph, there was an additional horiz…

    …ontal line
    
    it looked really weird and was especially noticeable for the dailyTotal because the horizontal line was around 40 on the y-axis
    
    fix 🛠️: chart.js connects the points based on the order they appear in the array, not based on their x-axis value (in this case the date of the pollen measurement)
    
    so sorting the parsed pollen data based on the date fixed this issue 👌👌👌😃😃😃
    arnard76 committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    1727e80 View commit details
    Browse the repository at this point in the history
  4. rename tests

    arnard76 committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    cbf762d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c912193 View commit details
    Browse the repository at this point in the history
  6. adding e2e visual test for tooltip on pollen calendar

    it should look as it does right now (50% difference is tolerated). but if it is not there, the test will let us know 😃🧪👌
    arnard76 committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    7849e98 View commit details
    Browse the repository at this point in the history
  7. fix chart lagging issue

    arnard76 committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    ea257b8 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. Configuration menu
    Copy the full SHA
    1c20dc1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    be6a5f5 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. cleaning up code 🧹🧹🧼🧼

    even if errors, show any preview of any parsed data
    
    update the types
    arnard76 committed May 2, 2024
    Configuration menu
    Copy the full SHA
    6a0b6ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ee91ca6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    be0cdcf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    850163e View commit details
    Browse the repository at this point in the history

Commits on May 4, 2024

  1. Configuration menu
    Copy the full SHA
    b3f61cf View commit details
    Browse the repository at this point in the history

Commits on May 5, 2024

  1. Configuration menu
    Copy the full SHA
    f30eef7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f34ab61 View commit details
    Browse the repository at this point in the history
  3. fix naming inconsistencies

    HuzzNZ committed May 5, 2024
    Configuration menu
    Copy the full SHA
    49147a4 View commit details
    Browse the repository at this point in the history