1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
Commit Graph

3771 Commits

Author SHA1 Message Date
Thomas Heartman
248d859b80
fix: cleanup should be completed (#8819)
This PR changes the term "cleanup" to "completed" for the lifecycle
summary.
2024-11-21 11:05:32 +01:00
Jaanus Sellin
c18952f374
feat: licensed users ui rework (#8809)
1. Moved link creation bottom next to licensed users view
2. Created licensed users component
3. Added flag

OSS:

![image](https://github.com/user-attachments/assets/cfb2b971-3861-4093-91a5-f3118b906029)
All others

![image](https://github.com/user-attachments/assets/e8cf712f-7e66-44f6-9965-1bb785e4f3fc)
2024-11-21 11:46:40 +02:00
Mateusz Kwasniewski
4a769d14a5
feat: upgrade sso (#8813) 2024-11-20 16:42:34 +01:00
Tymoteusz Czech
01bd877a81
feat: info about unlimited projects option (#8814)
- refactored projects list header
- added info about unlimited projects to open-source version
2024-11-20 16:40:19 +01:00
Nuno Góis
b7af9b7ec3
chore: PAYG traffic bundles (#8805)
https://linear.app/unleash/issue/2-2989/unleash-payg-auto-traffic-billing

Integrates auto traffic bundle billing with PAYG.

Currently assumes the PAYG traffic bundle will have the same
`$5/1_000_000` cost as the existing Pro traffic bundle, with the same
`53_000_000` included requests. However some adjustments are included so
it's easier to change this in the future.
2024-11-20 15:20:50 +00:00
Mateusz Kwasniewski
332440491a
feat: remove bold/strong from personal dashboard events (#8330) 2024-11-20 15:40:48 +01:00
Mateusz Kwasniewski
8e7c63ac68
feat: upgrade change requests (#8812) 2024-11-20 15:16:28 +01:00
Thomas Heartman
640c16fc22
fix: center health widgets and text (#8810)
This change updates how the health widgets are aligned with their
text. They used to be aligned towards the top; now, they're centered.
2024-11-20 14:44:07 +01:00
Thomas Heartman
d661096fb7
fix: don't break personal dashboard charts if the flag is called . (#8807)
This PR fixes an issue where the personal dashboard would fail to render
if the flag was called `.` (Curiously, it was not an issue with `..`;
probably because they end up accessing different URLs).

I've taken the very pragmatic approach here of saying "right, we know
that `.` and `..` cause issues, let's just not even try to fetch data
for them".

The option, of course, is to bake in more error handling in the
components, but due to how we've got hooks depending on each other, it's
a bit of a rabbit hole to go down. I think this is a good compromise for
now.

So now, you'll get this instead:

![image](https://github.com/user-attachments/assets/827b1800-d2aa-443e-ba0c-b0b1643ec3f1)

I've also gone and updated the text for when we get a metrics fetching
error, because this probably isn't due to the flag name anymore. If it
is, we want to know.
2024-11-20 14:38:57 +01:00
Mateusz Kwasniewski
61df153a5b
feat: upgrade more environments (#8804) 2024-11-20 12:56:59 +01:00
Thomas Heartman
04b2b488f6
chore(1-3133): change avg health to current health in project status (#8803)
This PR updates the project status service (and schemas and UI) to use
the project's current health instead of the 4-week average.

I nabbed the `calculateHealthRating` from
`src/lib/services/project-health-service.ts` instead of relying on the
service itself, because that service relies on the project service,
which relies on pretty much everything in the entire system.

However, I think we can split the health service into a service that
*does* need the project service (which is used for 1 of 3 methods) and a
service (or read model) that doesn't. We could then rely on the second
one for this service without too much overhead. Or we could extract the
`calculateHealthRating` into a shared function that takes its stores as
arguments. ... but I suggest doing that in a follow-up PR.

Because the calculation has been tested other places (especially if we
rely on a service / shared function for it), I've simplified the tests
to just verify that it's present.

I've changed the schema's `averageHealth` into an object in case we want
to include average health etc. in the future, but this is up for debate.
2024-11-20 11:41:45 +01:00
Thomas Heartman
0f91c6b0c2
fix: link to unhealthy flags filter (#8802)
This change updates the "view unhealthy flags" link in the project
status sidebar to use the correct filter. The previous link was put in
before we had a filter for potentially stale, so this updates the link
to use that filter.
2024-11-20 09:37:39 +00:00
Mateusz Kwasniewski
ec44c5b5e4
chore: remove personal dashboard UI flag (#8795) 2024-11-20 09:24:08 +01:00
David Leek
5406d4d8d5
chore: addReleasePlan api hook use template id in payload (#8801) 2024-11-20 08:52:24 +01:00
David Leek
74535e98a3
chore: hide release plan template permissions behind feature flag (#8799) 2024-11-20 07:59:45 +01:00
Thomas Heartman
b23dd940af
feat: add potentially stale filter to flags filter (#8798)
This PR adds the option to select potentially stale flags from the UI.

It also updates the name we use for parsing from the API: instead of
`potentiallyStale` we use `potentially-stale`. This follows the
precedent set by "kill switch" (which we send as 'kill-switch'), the
only other multi-word option that I could find in our filters.
2024-11-19 16:37:32 +02:00
David Leek
8935a01d90
feat: create and edit release plan template milestones (#8768) 2024-11-19 13:52:07 +01:00
Tymoteusz Czech
9d96052a3b
fix: update users session warning in users table (#8794) 2024-11-19 10:36:04 +00:00
Mateusz Kwasniewski
04a7b05ac3
chore: stop using personal dashboard UI flag (#8793) 2024-11-19 10:51:37 +01:00
Tymoteusz Czech
cd0a65a279
feat: change max session count warning to 4 devices (#8792) 2024-11-19 10:26:52 +01:00
Tymoteusz Czech
7820ca62ad
feat: show max count of sessions that users have to an admin (#8781)
Add info about large number of parallel sessions per user.
2024-11-18 15:15:56 +00:00
Thomas Heartman
18591dd017
fix: use the correct design token color for the health chart background (#8783)
This change swaps out the color of the health chart "unfilled" section
for `theme.palette.background.application`. This is the same color
that's used in the sketches, so it should apply better for dark mode.

Why? I noticed that the graph looks choppy in dark mode, so figured
I'd go and investigate. This update makes it look a lot smoother.

Light mode looks the same as before.

Before (notice the leaking light grey):

![image](https://github.com/user-attachments/assets/535ca24b-756b-460c-a7ab-78daf28d68ba)


After:

![image](https://github.com/user-attachments/assets/98d4c0de-bde3-4d10-9210-fdd0bf5dc572)
2024-11-18 14:07:40 +02:00
Thomas Heartman
a55a956772
1-3120: remove project connected environments (#8775)
Remove everything related to the connected environment count for project
status. We decided that because we don't have anywhere to link it to at
the moment, we don't want to show it yet.
2024-11-18 12:01:25 +01:00
Thomas Heartman
fb9c754008
feat: combine health and status widgets (#8782)
This PR combines the health and status widgets into a single widget. It
adds a new row with information on your unhealthy flags.

The stat prettifies large numbers to avoid overflows for very large
numbers. To keep it in line with the SVG, I've extracted some of the
constants so we can share them for size calculation.


![image](https://github.com/user-attachments/assets/0b66b6ba-b88c-412e-838f-bd5e7867cdc3)

When it folds, it uses the "space-around" algorithm to make the two
stats occupy their own positions:

![image](https://github.com/user-attachments/assets/eb3a4f0e-31fa-4895-ba12-c6f910112204)

The number uses a custom background color in dark mode because elevation
1 and 2 are the same there:

![image](https://github.com/user-attachments/assets/fa405c33-f38a-4fea-bf20-e1d9bf21bb1c)
2024-11-18 12:01:08 +01:00
David Leek
0ce976a0d5
feat: implement call to add release-plan to feature environment (#8778) 2024-11-18 09:30:29 +01:00
Tymoteusz Czech
6d4e2e991f
fix: device count flag without variant (#8773) 2024-11-15 13:05:50 +01:00
Tymoteusz Czech
9d5fceb5bf
feat: show users with multiple parallel sessions (#8756) 2024-11-15 10:34:38 +00:00
Thomas Heartman
f89bc33645
1-3125: Update project navigation for the simplified view (#8770)
The changes are:
- Change "Flags" to "Overview"
- Also hide "Insights" and "Health"
- Change "Project settings" to "Settings"
2024-11-15 09:56:41 +00:00
Thomas Heartman
046573174b
fix(a11y): Fix keyboard navigation issues with sidebar (#8769)
This PR fixes a number of keyboard accessibility issues with the
feedback sidebar. They are (in no particular order):
1. The radio inputs don't have a focus style for `focus-visible` (when
keyboard focused).
2. There's two close buttons there for some reason? One is invisible,
but you can tab to it?
3. The sidebar doesn't trap focus, so you can tab out of the modal and
continue tabbing through the main page (with the modal still open)
4. The sidebar doesn't steal focus. When you open it, your focus remains
on the button you used to open it. So if you want to navigate to it, you
have to go through the entire page (behind the modal) to get to it.
5. The sidebar can't be closed by 'escape'.

The fixes are:
1. Apply the same styles when focus visible as when hover
2. Wrap the component in the `BaseModal` component
3. Wrap the component in the `BaseModal` component
4. Wrap the component in the `BaseModal` component
5. Wrap the component in the `BaseModal` component

(see a theme here?)

Additionally, because the base modal has its own `open` state, I removed
the wrapping conditionally render, reducing nesting by one stop. Most of
the changes in the file are just whitespace changes.


![image](https://github.com/user-attachments/assets/28832756-cfb3-4ced-8b8c-a344edced036)

I considered also applying an auto-focus to the first input in the
sidebar, but our linter doesn't like it. Additionally MDN lists the
following [accessibility
concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns)

> Automatically focusing a form control can confuse visually-impaired
people using screen-reading technology and people with cognitive
impairments. When autofocus is assigned, screen-readers "teleport" their
user to the form control without warning them beforehand.
>
> Use careful consideration for accessibility when applying the
autofocus attribute. Automatically focusing on a control can cause the
page to scroll on load. The focus can also cause dynamic keyboards to
display on some touch devices. While a screen reader will announce the
label of the form control receiving focus, the screen reader will not
announce anything before the label, and the sighted user on a small
device will equally miss the context created by the preceding content.

So I'll leave it off.
2024-11-15 10:24:53 +01:00
Thomas Heartman
b4d19862d7
1-3122: refetch CR notifs on actions (#8767)
Refetch actionable change requests whenever you perform an action on a
change request. This ensures that the change request notifications are
up-to-date for you. Of course, it can still get out of sync if someone
else performs an action on the change request, but that's more of an
edge case.
2024-11-15 10:02:36 +01:00
Mateusz Kwasniewski
b3437b8c34
feat: Max sessions limit (#8765) 2024-11-15 09:57:17 +01:00
Thomas Heartman
5d36862ddb
feat: add project status feedback (#8764)
This PR adds the feedback component to the project status page. When you
open the feedback modal, we close the status sidebar. Exiting the
feedback modal takes you back to the project page.

As a bonus: fixes the background color of the health grid, which was a
little bit off.


![image](https://github.com/user-attachments/assets/6e7e61cb-75f4-44ac-9efd-632b40ccab51)


![image](https://github.com/user-attachments/assets/6e049719-cff3-4b85-8f02-e0174b515ab2)
2024-11-15 10:51:00 +02:00
Nuno Góis
6db6cc2bd6
refactor: remove unused component UserSeats (#8757)
https://linear.app/unleash/issue/2-2974/remove-unused-component-userseats

Removes the unused component `UserSeats`.
2024-11-15 08:45:32 +00:00
Mateusz Kwasniewski
5a2663a451
test: session deleted toast (#8754) 2024-11-15 09:31:42 +01:00
Thomas Heartman
2014d367f8
1-3073: close sidebar when you click a link within it (#8763)
This change makes it so that the project status sidebar will close
when you follow a link within it. We do that by using JS event
bubbling and attaching a handler on the modal parent. We can listen
for events and check whether the target is an anchor and, if so, close
the modal.
2024-11-15 07:36:22 +00:00
Jaanus Sellin
1af204e0f0
feat: now pay as you go billing banner has link (#8761)
My intuition wanted to click on it to start paying, but it did not work.
Changed condition to show it for pay as you go.


![image](https://github.com/user-attachments/assets/d14ad947-ce4a-48cb-8bbd-c1d6dfb84a0a)
2024-11-15 09:26:49 +02:00
Thomas Heartman
c9b674f7ab
fix: Project Status UI fixes (#8762)
This PR fixes a few small UI issues reported by UX. It:
- Adds hover colors to the lifecycle boxes
- Adjusts the font size for the health widget to match project resources
and lifecycle
- Makes the `view health over time tooltip` take you to the insights
page with the current project preselected


![image](https://github.com/user-attachments/assets/f672a577-1b01-4d45-98da-d5c367c9a0bc)
2024-11-15 07:16:09 +00:00
Thomas Heartman
7e96033c4a
3111-1: Wires up stale data from the API (#8752)
Builds on the backend code added in
https://github.com/Unleash/unleash/pull/8751

This wires up the front end to use the data returned from the API
2024-11-14 14:23:05 +00:00
Thomas Heartman
5d32d149cd
feat: add stale flag count to project status payload (#8751)
This PR adds stale flag count to the project status payload. This is
useful for the project status page to show the number of stale flags in
the project.
2024-11-14 14:10:10 +00:00
Thomas Heartman
b4e2d5d270
Add close button, fix layout, refactor (#8755)
This PR consists of cleanup for the project status modal as well as
adding the missing button.

I've added inline comments to explain the different steps.

It now looks like this:

![image](https://github.com/user-attachments/assets/29a3c0b7-770c-4019-aaed-b363c5804138)
2024-11-14 15:00:32 +01:00
Nuno Góis
395a4b6be3
chore: PAYG billing (#8743)
https://linear.app/unleash/issue/CTO-95/unleash-billing-page-for-enterprise-payg

Adds support for PAYG in Unleash's billing page.

Includes some refactoring, like splitting Pro and PAYG into different
details components. We're now also relying on shared billing-related
constants (see `BillingPlan.tsx`). This should make it much easier to
change any of these values in the future. I already changed a few that
were static / wrongly relying on instanceStatus.seats (we decided we're
not doing that for now).


![image](https://github.com/user-attachments/assets/97a5a420-a4f6-4b6c-93d6-3fffddbacbc7)
2024-11-14 11:29:05 +00:00
Tymoteusz Czech
3699646680
Restore additional feedback page (#8750)
Partial revert of 656483d819
Reuse search feedback.
2024-11-14 12:01:45 +02:00
Mateusz Kwasniewski
4fabf49706
feat: show deleted user sessions (#8749) 2024-11-14 10:30:31 +01:00
Thomas Heartman
9440b52464
feat: Add stale flags counter (#8741)
This PR adds the stale flag component to the health grid. In doing so,
it also reworks the layout of the health row (now a grid) and updates
the health component.

In addition to removing the text from the component, I have adjust the
SVG a bit to make it not shrink on smaller screens and have adjusted
it's spacing, so that it's not full of dead space at the bottom. This
makes it easier to style because it doesn't add 15px of invisible
content.

This PR also touches up a few other visual issues I found, such as
header level and sidebar width.

Wide:

![image](https://github.com/user-attachments/assets/acb57b17-eb7f-4b69-9bfa-1113bb748467)

Medium:

![image](https://github.com/user-attachments/assets/a57331b0-825f-4b20-9b05-3ecd81804f5d)

Narrow:

![image](https://github.com/user-attachments/assets/65c6e8d1-1783-4354-b71b-2867eabcc9ec)
2024-11-14 08:55:21 +00:00
Tymoteusz Czech
fecf57c467
fix: send UI error tracking (#8725)
Put error boundary inside of stats provider.
2024-11-13 16:13:05 +01:00
Thomas Heartman
088eaedbc3
feat: add tooltips to lifecycle boxes (#8739)
This pr adds tooltips to lifecycle boxes when they're hovered or
focused. There's also some small copy tweaks.

We decided to go with tooltips instead of buttons for this iteration
because it'd be an easier thing to implement, especially in regards to
keyboard navigation and avoiding overlapping other elements.

I've also not changed the background color of the tooltips just yet.
There's two reasons for this:
1. The practical reason is that our `HtmlTooltipComponent` doesn't allow
you to do that and I didn't wanna start messing about with that.

2. If all our other tooltips follow this color scheme, why not do the
same here? Especially because they're not buttons anymore, so using the
same color as other tooltips seems sensible.

![image](https://github.com/user-attachments/assets/2e0ebf26-6809-4952-87db-9b7d2838eed7)
2024-11-13 14:52:43 +01:00
Thomas Heartman
bc7511abd4
chore: prepare for lifecycle comments (#8733)
This PR is a preparation for adding lifecycle comments. It turns the
Lifecycle boxes into buttons, using MUI's
[`CardActionArea`](https://mui.com/material-ui/api/card-action-area/)
component, and allows you to select one at a time.

I'm not convinced about the a11y of this approach, but it appears to be
in line with what MUI suggests, so ...

I'll add the speech bubbles in a follow-up.

<img width="1059" alt="image"
src="https://github.com/user-attachments/assets/ad3f649f-10de-4418-a780-10321e90d001">
2024-11-13 12:02:33 +00:00
David Leek
cb316f012c
feat: frontend initial page for creating release templates (#8732) 2024-11-13 11:03:19 +01:00
Jaanus Sellin
b6f573c6b9
feat: coloring of health chart (#8731)
1. Now properly color the chart based on 0-25,25-75,75-100 thresholds.
2. Fix spacing
3. Fix wrong svg implementation


![image](https://github.com/user-attachments/assets/1bd2f565-3156-4b09-896c-e126335d182c)
2024-11-13 11:49:16 +02:00
Thomas Heartman
b87c47d7c4
1-3083: add remaining lifecycle header + tooltip (#8722)
This PR adds a header and a tooltip to the lifecycle widget. Most of the
changes in ProjectLifecycleSummary is indentation changes due to
wrapping the component in another row container.

Additionally, this PR touches the `HelpIcon` component because we'd like
the tooltip to be wider than what we currently set as the default for
the help icon. The help icon uses the html tooltip component, which has
a maxWidth prop, but it does not expose that. So I've adjusted it to let
you do that.



Header with tooltip:

![image](https://github.com/user-attachments/assets/6ae1984b-256b-4f09-8fa2-b86ac2c17558)
2024-11-13 10:16:35 +01:00