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

Add Sorting and Filtering to Projects Page #198

Merged
merged 12 commits into from
Aug 14, 2024

Conversation

RicardoZamora01
Copy link
Contributor

@RicardoZamora01 RicardoZamora01 commented Jul 31, 2024

module-name: Add Sorting and Filtering to Projects Page

Problem

We currently do not have a way for users to filter based on criteria (fisma compliance level, tier, organization, project type, etc.) other than project searching/querying. There is also no way for users to sort projects based on criteria.

Solution

Implementing filtering and sorting to projects page.

Result

More convenient site navigation for users.

Testing

In virtual environment, run ./update.sh 'DSACMS'. New code.json data should be updated into data for open, dedupliFHIR, metrics, and repo-scaffolder. This will allow you to test filtering + sorting by code.json attributes (maturity model tier, project type, fisma compliance level)

app/src/js/projects.js Fixed Show fixed Hide fixed
app/src/js/projects.js Fixed Show fixed Hide fixed
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
decause-gov
decause-gov previously approved these changes Aug 13, 2024
Copy link
Contributor

@decause-gov decause-gov left a comment

Choose a reason for hiding this comment

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

Other than the CodeQL medium warning, which I think is probably safe because we don't allow user input, I don't see anything in here I don't like. Will defer to @IsaacMilarky on that.

Otherwise, LGTM +1 🚢

app/site/_data/filters.json Show resolved Hide resolved
app/src/js/projects.js Show resolved Hide resolved
app/src/js/projects.js Show resolved Hide resolved
@IsaacMilarky
Copy link
Collaborator

Other than the CodeQL medium warning, which I think is probably safe because we don't allow user input, I don't see anything in here I don't like. Will defer to @IsaacMilarky on that.

Otherwise, LGTM +1 🚢

The XSS vulnerability could be a problem in theory but I don't think its likely to happen. We should probably try to fix it if possible.

@RicardoZamora01
Copy link
Contributor Author

Other than the CodeQL medium warning, which I think is probably safe because we don't allow user input, I don't see anything in here I don't like. Will defer to @IsaacMilarky on that.
Otherwise, LGTM +1 🚢

The XSS vulnerability could be a problem in theory but I don't think its likely to happen. We should probably try to fix it if possible.

We can run a easy fix to sanitize the HTML by running DOMPurify.sanitize on the HTML elements. @IsaacMilarky

Signed-off-by: Ricardo Zamora <rzgarcia27@gmail.com>
Copy link

@patsier-cms patsier-cms left a comment

Choose a reason for hiding this comment

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

I looked over the DOMPurify docs and it seems like this should address the issue, thanks!

@IsaacMilarky IsaacMilarky merged commit d1ec0f8 into dev Aug 14, 2024
4 checks passed
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