1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-19 17:52:45 +02:00
unleash.unleash/frontend/src/component/common
Thomas Heartman 945e086f81
feat: add "my projects" filter to projects list (#6831)
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 with `leftActions` instead of `inlineStartActions` 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.


![image](https://github.com/Unleash/unleash/assets/17786332/7d6ba98c-a34b-45d4-85f4-2b1c2f3dc0c8)


## 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:

![image](https://github.com/Unleash/unleash/assets/17786332/bf4f70d7-13b7-410a-9de4-30f4873a2ab8)

The old version breaking at about 250px:

![image](https://github.com/Unleash/unleash/assets/17786332/2d4e1e9c-8442-471c-91e4-67c024736234)

### Margins

We also need to figure out how much space we want on smaller windows:


![image](https://github.com/Unleash/unleash/assets/17786332/b12804b1-a2db-4547-88d5-0d9d49221fe2)
2024-04-12 12:35:47 +02:00
..
AnimateOnMount chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Announcer chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
ApiError chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
ApiTokenTable chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
AutocompleteBox chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Badge chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
BatchSelectionActionsBar chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
BreadcrumbNav fix: uri decode breadcrumbs (#6557) 2024-03-14 15:59:44 +01:00
CheckmarkBadge fix: icon imports (#6499) 2024-03-12 10:56:10 +01:00
Codebox
ConditionallyRender chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
ConstraintAccordion Feat: context field search and filter improvements (#6732) 2024-03-29 15:44:34 +02:00
CreateButton chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
DateTimePicker chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Dialogue chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
DividerText
DropdownMenu chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
EnterpriseBadge chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
EnvironmentIcon fix: icon imports (#6499) 2024-03-12 10:56:10 +01:00
ExperimentalFeedback chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
FavoriteIconButton chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
FeatureArchiveDialog chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
FeatureStaleDialog chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
FeatureStatusChip
Feedback chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
FilterDateItem chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
FormSwitch chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
FormTemplate chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
GeneralSelect chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Gradient chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
GridCol chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
GridRow chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
GuidanceIndicator chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
HelpIcon chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Highlighter chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
HtmlTooltip chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Input chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
InputCaption
InputListField chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
InstanceStatus chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
ItemList chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Loader
LoginRedirect
MainHeader chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Markdown chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
MultiActionButton chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
MultipleRoleSelect chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
NewConstraintAccordion fix: dark mode background (#6803) 2024-04-09 10:14:17 +03:00
NoItems chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
NotFound chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Notifications chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
OperatorUpgradeAlert
PageContent chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
PageHeader feat: add "my projects" filter to projects list (#6831) 2024-04-12 12:35:47 +02:00
PasswordField chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
PercentageCircle chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
PermissionButton chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
PermissionGuard chore: add support for project and environment in PermissionGuard (#6008) 2024-01-24 08:20:38 +00:00
PermissionHOC chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
PermissionIconButton chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
PermissionSwitch chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
PremiumFeature task: Make Inactive users an enterprise feature (#6510) 2024-03-12 10:01:10 +00:00
PrettifyLargeNumber chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Proclamation chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
ProjectSelect fix: Project select should not expand when selecting multiple projects (#6811) 2024-04-10 12:34:11 +03:00
ProtectedRoute chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
ReactJSONEditor chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
ResponsiveButton chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
RoleBadge fix: icon imports (#6499) 2024-03-12 10:56:10 +01:00
RoleDescription chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
RoleSelect chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
ScrollTop
Search chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
SegmentItem fix: show segment details in targetting (#6640) 2024-03-22 10:14:19 +01:00
SidebarModal chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
SidePanelList chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
SkipNavLink
StaleDataNotification
Sticky chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
StrategyItemContainer chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
StrategySeparator
StrategyVariantsUpgradeAlert
StringTruncator
Table feat: padding last seen (#6716) 2024-03-27 15:51:11 +02:00
TabNav chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
ThemeMode
ToastRenderer chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
TooltipLink chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
TooltipResolver chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
UpdateButton chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
UserAvatar chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
VariantInfoAlert chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
VerticalTabs
common.module.scss
flags.ts
index.jsx chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
select.tsx chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
util.test.ts
util.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00