Skip to content

Updates web packages #134

Merged
nkcr merged 14 commits intomainfrom
web-update
Jun 7, 2022
Merged

Updates web packages #134
nkcr merged 14 commits intomainfrom
web-update

Conversation

@nkcr
Copy link
Contributor

@nkcr nkcr commented Jun 2, 2022

No description provided.

@nkcr nkcr requested review from badrlarhdir and cmsigrist June 2, 2022 07:56
@nkcr nkcr self-assigned this Jun 2, 2022
@coveralls
Copy link

coveralls commented Jun 2, 2022

Pull Request Test Coverage Report for Build 2427942034

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 63.494%

Totals Coverage Status
Change from base Build 2410134754: 0.0%
Covered Lines: 3129
Relevant Lines: 4928

💛 - Coveralls

Copy link
Contributor

@badrlarhdir badrlarhdir left a comment

Choose a reason for hiding this comment

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

Looks good to me !

"@heroicons/react": "^1.0.6",
"@material-ui/core": "^4.12.3",
"@mui/material": "^5.4.0",
"@material-ui/core": "^4.12.4",
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any imports inside the code of material UI , I think we can remove it .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great, nice catch !

});

// Keeps an in-memory mapping between a SCIPER (userid) and its opened session
// IDs. Needed to invalidate the sessions of a used when its role changes. The
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// IDs. Needed to invalidate the sessions of a used when its role changes. The
// IDs. Needed to invalidate the sessions of a user when its role changes. The

// Keeps an in-memory mapping between a SCIPER (userid) and its opened session
// IDs. Needed to invalidate the sessions of a used when its role changes. The
// value is a bag of sessions IDs.
const sess2sciper = new Map<number, Map<string, undefined>>();
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the undefined field of the inner map ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The map is used as a bag/set. Javascript doesn't have a native data structure for that, so I am using a map where only the keys are used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh ok I see, although sets do exist in Javascript which should work for the session IDs, at least if it doesn't matter if duplicate session IDs for a user only appear once in the set ?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing that, I overlooked this native Set data-structure, which exactly fits the purpose !

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@nkcr nkcr merged commit f3c332c into main Jun 7, 2022
@nkcr nkcr deleted the web-update branch June 7, 2022 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants