-
-
Notifications
You must be signed in to change notification settings - Fork 656
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: add "my projects" filter to projects list #6831
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
1a7cf66
to
97817f6
Compare
There was a problem hiding this 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) 🚩
There was a problem hiding this 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) 🚩
We'll probably need to look closer at this at certain break points.
There was a problem hiding this 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) 🚩
There was a problem hiding this 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) 🚩
000dc08
to
421c266
Compare
There was a problem hiding this 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) 🚩
There was a problem hiding this 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) 🚩
There was a problem hiding this 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) 🚩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was failing because the class name had changed. I'm assuming this is somehow caused by some of the other changes in this PR. However, it doesn't appear to have a visual effect. I'm guessing some input args to some algorithm changed which is reflected here. I think this is a safe change to make, but I'd love for you to tell me if you disagree.
There was a problem hiding this 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) 🚩
const showProjectFilterButtons = useUiFlag('projectListFilterMyProjects'); | ||
const filters = ['All projects', 'My projects']; | ||
const [filter, setFilter] = useState(filters[0]); | ||
|
There was a problem hiding this comment.
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 16 to 17, threshold = 10
This PR adds the buttons (only UI, no functionality) to show either "all projects" or "my projects".
The buttons use a styled button group and are hidden behind the new
projectListFilterMyProjects
flag.The button placement breaks with the previously established page header pattern of having all actions moved to the right. To accommodate this new placement, I created a new flex container in the header called
leftActions
, which is essentially just a mirror of the normal actions. I went withleftActions
instead ofinlineStartActions
or something similar because I think it's clearer, and I don't see us adapting Unleash for different writing directions right now. We can always change it later.I have also slightly increased the end margin of the page header to accommodate the new designs and to adjust the spacing before the buttons. I adjusted the margin of the text instead of the padding of the left actions because this will keep the spacing to the page header the same on every page. Without it, we could end up in situations where the spacing changes from page to page based on whether it has left actions or not, which is probably undesirable.
Still to do:
Hover colors
Find out what the right hover color variable is. I'm using the light mode hover color for now, which works well in both light and dark modes (looks nice and is AAccessible), but it's not the same as the hover color for other buttons in dark mode.Fixed ☝🏼
Small windows
Also worth noting: at around 500px, the layout shift starts to cause problems and we end up with overlapping elements. How do we want to deal with narrower screens? Today, the UI is pretty functional until we reach about 250px. It would be nice to not increase that size.
The new version breaking at about 500px:
The old version breaking at about 250px:
Margins
We also need to figure out how much space we want on smaller windows: