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

feat: allow you to filter for "my projects" #6855

Merged
merged 4 commits into from
Apr 15, 2024

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Apr 15, 2024

This change adds filtering functionality to the project list filter buttons.

In this case, "my projects" is defined as any project that is marked as a favorite OR (inclusive or) that you are a part of, as defined by your user profile.

Copy link

vercel bot commented Apr 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 15, 2024 11:04am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Apr 15, 2024 11:04am

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

@thomasheartman thomasheartman changed the title feat: add actual filter functionality feat: allow you to filter for "my projects" Apr 15, 2024
This prevents weird edge cases where we read the state but have
disabled the feature
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

@@ -139,6 +141,7 @@ export const ProjectListNew = () => {
const showProjectFilterButtons = useUiFlag('projectListFilterMyProjects');
const filters = ['All projects', 'My projects'];
const [filter, setFilter] = useState(filters[0]);
const myProjects = new Set(useProfile().profile?.projects || []);

Choose a reason for hiding this comment

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

❌ Getting worse: Complex Method
ProjectListNew increases in cyclomatic complexity from 17 to 21, threshold = 10

Suppress

@thomasheartman thomasheartman enabled auto-merge (squash) April 15, 2024 11:05
@thomasheartman thomasheartman merged commit 3d60c2a into main Apr 15, 2024
12 of 13 checks passed
@thomasheartman thomasheartman deleted the feat/add-my-project-filtering branch April 15, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants