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

fix(ui): code-split markdown title + desc, fix row linking, etc #12580

Merged
merged 2 commits into from
Feb 26, 2024

Commits on Jan 28, 2024

  1. fix(ui): lazy load markdown title + desc, fix CSS issues etc

    - `react-markdown` and `remark-gfm` are large deps, so we should code-split / lazy load them
      - and we should only load them if a user is using this feature
        - can't quite detect if a string is markdown without a dep, but can at least check if the annotations are used
      - shaved off ~575KB / ~140KB minified / ~41KB gzipped from the main entrypoint
    
    - CSS had several issues
      - was imported from the wrong component
      - `overlay` was not sufficiently unique (as we currently use global CSS and not something like CSS Modules)
      - some unnecessary CSS attributes
      - most importantly, the positioning of rows broke and did not flex to the last column
        - it caused columns to not match the heading very confusingly and a lot of empty space on the right as well
        - that also broke some overflow properties
        - and it broke the details drawer as well
    
    - remove `Link` for the entire row as it was unintuitive, especially with the drawer
      - one could also not copy+paste things from the row because it caused a click
      - only link the workflow name now
    
    - fix nested link issues
      - capture the event, prevent bubble up, and process it with JS
    
    Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
    agilgur5 committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    a4dde3a View commit details
    Browse the repository at this point in the history
  2. remove no longer used imports

    - these were from when I was trying to lazy load `remark-gfm` in the same file and for some reason forgot I could just split both imports into one file that I could lazy load / code-split
    
    Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
    agilgur5 committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    041db5d View commit details
    Browse the repository at this point in the history