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

Minor refactorings #942

Merged
merged 13 commits into from
Nov 22, 2023
Merged

Conversation

cosa65
Copy link
Member

@cosa65 cosa65 commented Nov 17, 2023

Description

Details

URL to issue

N/A

Link to staging deployment URL (or set N/A)

https://ui-martinfosco-ui54.scp-staging.biomage.net/
N/A

Links to any PRs or resources related to this PR

biomage-org#54

Integration test branch

master

Merge checklist

Your changes will be ready for merging after all of the steps below have been completed.

Code updates

Have best practices and ongoing refactors being observed in this PR

  • Migrated any selector / reducer used to the new format.
  • All new dependency licenses have been checked for compatibility.

Manual/unit testing

  • Tested changes using InfraMock locally or no tests required for change, e.g. Kubernetes chart updates.
  • Validated that current unit tests for code work as expected and are sufficient for code coverage or no unit tests required for change, e.g. documentation update.
  • Unit tests written or no unit tests required for change, e.g. documentation update.

Integration testing

You must check the box below to run integration tests on the latest commit on your PR branch.
Integration tests have to pass before the PR can be merged. Without checking the box, your PR
will not pass the required status checks for merging.

  • Started end-to-end tests on the latest commit.

Documentation updates

  • Relevant Github READMEs updated or no GitHub README updates required.
  • Relevant Wiki pages created/updated or no Wiki updates required.

Optional

  • Staging environment is unstaged before merging.
  • Photo of a cute animal attached to this PR.

Copy link
Contributor

📦 Next.js Bundle Analysis for ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 580.33 KB (🟡 +477 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sixteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/data-management 239.22 KB (🟡 +279 B) 819.55 KB
/experiments/[experimentId]/data-exploration 516.46 KB (🟢 -3.46 KB) 1.07 MB
/experiments/[experimentId]/data-processing 533.15 KB (🟢 -5.62 KB) 1.09 MB
/experiments/[experimentId]/plots-and-tables 15.7 KB (🟡 +74 B) 596.03 KB
/experiments/[experimentId]/plots-and-tables/batch-differential-expression 74.51 KB (🟡 +12 B) 654.84 KB
/experiments/[experimentId]/plots-and-tables/dot-plot 489.54 KB (🟢 -5.75 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/embedding-categorical 480.19 KB (🟢 -5.83 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/embedding-continuous 481.9 KB (🟢 -5.82 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/frequency 482.06 KB (🟢 -5.87 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/marker-heatmap 581.51 KB (🟢 -3.39 KB) 1.13 MB
/experiments/[experimentId]/plots-and-tables/normalized-matrix 170.74 KB (🟡 +92 B) 751.07 KB
/experiments/[experimentId]/plots-and-tables/trajectory-analysis 483.66 KB (🟢 -5.82 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/violin 511.62 KB (🟢 -5.75 KB) 1.07 MB
/experiments/[experimentId]/plots-and-tables/volcano 485.31 KB (🟢 -5.83 KB) 1.04 MB
/repository 108.79 KB (🟡 +159 B) 689.12 KB
/settings/profile 25.64 KB (🟡 +138 B) 605.97 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@@ -124,7 +129,7 @@ const CellSetsTool = (props) => {
const renderContent = () => {
let operations = null;

if (numSelectedCellSetKeys > 0) {
if (numSelectedCellSetKeys !== null) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Before, if you selected a cell class that was empty it wouldn't say "0 cells selected" because numSelectedCellSetKeys === 0 meant that nothing was shown.

I added null so that:

  1. nothing is selected ---> numSelectedCellSetKeys = null
  2. the are selected things but they have 0 cells ---> numSelectedCellSetKeys = 0

In this way, we can show "0 cells selected" in case 2.

Copy link
Contributor

📦 Next.js Bundle Analysis for ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 580.33 KB (🟡 +477 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sixteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/data-management 239.22 KB (🟡 +279 B) 819.55 KB
/experiments/[experimentId]/data-exploration 516.46 KB (🟢 -3.46 KB) 1.07 MB
/experiments/[experimentId]/data-processing 533.15 KB (🟢 -5.62 KB) 1.09 MB
/experiments/[experimentId]/plots-and-tables 15.7 KB (🟡 +74 B) 596.03 KB
/experiments/[experimentId]/plots-and-tables/batch-differential-expression 74.51 KB (🟡 +12 B) 654.84 KB
/experiments/[experimentId]/plots-and-tables/dot-plot 489.54 KB (🟢 -5.75 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/embedding-categorical 480.19 KB (🟢 -5.83 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/embedding-continuous 481.9 KB (🟢 -5.82 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/frequency 482.06 KB (🟢 -5.87 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/marker-heatmap 581.51 KB (🟢 -3.39 KB) 1.13 MB
/experiments/[experimentId]/plots-and-tables/normalized-matrix 170.74 KB (🟡 +92 B) 751.07 KB
/experiments/[experimentId]/plots-and-tables/trajectory-analysis 483.66 KB (🟢 -5.82 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/violin 511.62 KB (🟢 -5.75 KB) 1.07 MB
/experiments/[experimentId]/plots-and-tables/volcano 485.31 KB (🟢 -5.83 KB) 1.04 MB
/repository 108.79 KB (🟡 +159 B) 689.12 KB
/settings/profile 25.64 KB (🟡 +138 B) 605.97 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link
Contributor

📦 Next.js Bundle Analysis for ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 580.34 KB (🟡 +485 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sixteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/data-management 239.22 KB (🟡 +282 B) 819.56 KB
/experiments/[experimentId]/data-exploration 516.46 KB (🟢 -3.46 KB) 1.07 MB
/experiments/[experimentId]/data-processing 533.15 KB (🟢 -5.61 KB) 1.09 MB
/experiments/[experimentId]/plots-and-tables 15.7 KB (🟡 +74 B) 596.04 KB
/experiments/[experimentId]/plots-and-tables/batch-differential-expression 74.51 KB (🟡 +12 B) 654.85 KB
/experiments/[experimentId]/plots-and-tables/dot-plot 489.54 KB (🟢 -5.75 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/embedding-categorical 480.19 KB (🟢 -5.83 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/embedding-continuous 481.9 KB (🟢 -5.82 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/frequency 482.06 KB (🟢 -5.87 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/marker-heatmap 581.51 KB (🟢 -3.39 KB) 1.13 MB
/experiments/[experimentId]/plots-and-tables/normalized-matrix 170.74 KB (🟡 +92 B) 751.07 KB
/experiments/[experimentId]/plots-and-tables/trajectory-analysis 483.66 KB (🟢 -5.82 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/violin 511.62 KB (🟢 -5.75 KB) 1.07 MB
/experiments/[experimentId]/plots-and-tables/volcano 485.31 KB (🟢 -5.83 KB) 1.04 MB
/repository 108.79 KB (🟡 +159 B) 689.13 KB
/settings/profile 25.64 KB (🟡 +138 B) 605.98 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Signed-off-by: cosa65 <[email protected]>
Copy link
Contributor

📦 Next.js Bundle Analysis for ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 580.34 KB (🟡 +491 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Sixteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/data-management 239.22 KB (🟡 +282 B) 819.57 KB
/experiments/[experimentId]/data-exploration 516.46 KB (🟢 -3.46 KB) 1.07 MB
/experiments/[experimentId]/data-processing 533.15 KB (🟢 -5.61 KB) 1.09 MB
/experiments/[experimentId]/plots-and-tables 15.7 KB (🟡 +74 B) 596.04 KB
/experiments/[experimentId]/plots-and-tables/batch-differential-expression 74.51 KB (🟡 +12 B) 654.85 KB
/experiments/[experimentId]/plots-and-tables/dot-plot 489.54 KB (🟢 -5.75 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/embedding-categorical 480.19 KB (🟢 -5.83 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/embedding-continuous 481.9 KB (🟢 -5.82 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/frequency 482.06 KB (🟢 -5.87 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/marker-heatmap 581.51 KB (🟢 -3.39 KB) 1.13 MB
/experiments/[experimentId]/plots-and-tables/normalized-matrix 170.74 KB (🟡 +92 B) 751.08 KB
/experiments/[experimentId]/plots-and-tables/trajectory-analysis 483.66 KB (🟢 -5.82 KB) 1.04 MB
/experiments/[experimentId]/plots-and-tables/violin 511.62 KB (🟢 -5.75 KB) 1.07 MB
/experiments/[experimentId]/plots-and-tables/volcano 485.31 KB (🟢 -5.83 KB) 1.04 MB
/repository 108.79 KB (🟡 +159 B) 689.13 KB
/settings/profile 25.64 KB (🟡 +138 B) 605.98 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link
Contributor

📦 Next.js Bundle Analysis for ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 579.86 KB (-6 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Three Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/data-management 238.95 KB (-2 B) 818.8 KB
/experiments/[experimentId]/data-exploration 519.93 KB (🟡 +12 B) 1.07 MB
/experiments/[experimentId]/data-processing 538.77 KB (🟡 +2 B) 1.09 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Signed-off-by: cosa65 <[email protected]>
Copy link
Contributor

📦 Next.js Bundle Analysis for ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/experiments/[experimentId]/data-exploration 519.93 KB (🟡 +12 B) 1.07 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@cosa65 cosa65 added the safe to run Sensitive jobs are safe to be run label Nov 17, 2023
Copy link
Contributor

📦 Next.js Bundle Analysis for ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/experiments/[experimentId]/data-exploration 519.93 KB (🟡 +12 B) 1.07 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (621e690) 85.62% compared to head (a7ee835) 85.62%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #942   +/-   ##
=======================================
  Coverage   85.62%   85.62%           
=======================================
  Files         558      558           
  Lines       10290    10290           
  Branches     2230     2230           
=======================================
  Hits         8811     8811           
  Misses       1423     1423           
  Partials       56       56           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

📦 Next.js Bundle Analysis for ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/experiments/[experimentId]/data-exploration 519.93 KB (🟡 +12 B) 1.07 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link
Contributor

📦 Next.js Bundle Analysis for ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/experiments/[experimentId]/data-exploration 519.95 KB (🟡 +12 B) 1.07 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Signed-off-by: cosa65 <[email protected]>
Copy link
Contributor

📦 Next.js Bundle Analysis for ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/experiments/[experimentId]/data-exploration 519.94 KB (-1 B) 1.07 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@cosa65 cosa65 merged commit ed081bf into hms-dbmi-cellenics:master Nov 22, 2023
15 of 16 checks passed
@cosa65 cosa65 deleted the minor-refactorings branch November 22, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to run Sensitive jobs are safe to be run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants