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

MNTOR-3396 - Organize storybook dashboard states #5308

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Commits on Nov 14, 2024

  1. Migrate utils/hibp.js to TypeScript

    This removes the `Breach` type in functions/universal/breaches,
    which was created when first introducing TypeScript and the flow
    of data was still unclear, but by now had overlap with other types
    and no clear provenance.
    
    Instead, there are now three breach-related types, that represent
    where the data came from:
    
    - HibpGetBreachesResponse: this is an array of breach elements as
                               returned from the HIBP API, unprocessed.
                               Properties are in PascalCase, so are a
                               breach's data classes.
    - BreachRow: this is a breach's data as stored in our database,
                 along with some data we added to it, such as a favicon
                 URL. Properties are snake_case, and data classes are
                 lowercased and kebab-cased by the
                 formatDataClassesArray function.
    - HibpLikeDbBreach: this is a breach's data fetched from the
                        database, but stored in an object meant to look
                        like the ones in HibpGetBreachesResponse. In
                        other words, it contains the same data as
                        BreachRow (including lowercased, kebab-cased
                        data classes), but on PascalCase properties.
    
    The latter is somewhat of a historical artefact, because we used
    to try to load breaches from our database, then if our database
    didn't contain any breaches yet, fetch them live from the HIBP API
    and continue working with that.
    
    We no longer do that: now, even after fetching them from the HIBP
    API, we do a new query to get them from the database and process
    them into HibpLikeDbBreach, so that we can assume a consisent data
    structure everywhere we work with breaches.
    Vinnl authored and codemist committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    3b4cb99 View commit details
    Browse the repository at this point in the history
  2. MNTOR-3435 - breaches js to ts

    codemist committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    17557e6 View commit details
    Browse the repository at this point in the history
  3. remove old typedef

    codemist committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    2ad7025 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0202072 View commit details
    Browse the repository at this point in the history
  5. fix rebase error

    codemist committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    652e7cc View commit details
    Browse the repository at this point in the history
  6. update breaches path

    codemist committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    678e63c View commit details
    Browse the repository at this point in the history
  7. organize storybook files

    codemist committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    5ff80f0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1e8a5ae View commit details
    Browse the repository at this point in the history
  9. organize dashboard states

    codemist committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    708434f View commit details
    Browse the repository at this point in the history
  10. rollback unwanted changes

    codemist committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    a1185b1 View commit details
    Browse the repository at this point in the history
  11. rollback unwanted changes

    codemist committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    2dece42 View commit details
    Browse the repository at this point in the history
  12. rollback unwanted changes

    codemist committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    a46ea36 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    21db932 View commit details
    Browse the repository at this point in the history