1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
Commit Graph

3633 Commits

Author SHA1 Message Date
Jaanus Sellin
7b686ed318
chore: full js sdk example (#8229) 2024-09-24 10:47:14 +03:00
Nuno Góis
7a3a5ad33c
chore: event timeline tooltips (#8205)
https://linear.app/unleash/issue/2-2664/implement-event-tooltips

Implements event tooltips in the new event timeline.

This leverages our current `feature-event-formatter-md` to provide both
a label and a summary of the event. Whenever our new `eventTimeline`
flag is enabled, we enrich our events in our event search endpoint with
this information. We've discussed different options here and reached the
conclusion that this is the best path forward for now. This way we are
being consistent, DRY, relatively performant and it also gives us a
happy path forward if we decide to scope in the event log revamp, since
this data will already be present there.

We also added a new `label` property to each of our event types
currently in our event formatter. This way we can have a concise,
human-readable name for each event type, instead of exposing the
internal event type string.

~~We also fixed the way the event formatter handled bold text (as in,
**bold**). Before, it was wrapping them in *single asterisks*, but now
we're using **double asterisks**. We also abstracted this away into a
helper method aptly named `bold`. Of course, this change meant that a
bunch of snapshots and tests needed to be updated.~~

~~This new `bold` method also makes it super easy to revert this
decision if we choose to, for any reason. However I believe we should
stick with markdown formatting, since it is the most commonly supported
formatting syntax, so I see this as an important fix. It's also in the
name of the formatter (`md`). I also believe bold was the original
intent. If we want italic formatting we should implement it separately
at a later point.~~

Edit: It was _bold_ of me to assume this would work out of the box on
Slack. It does when you manually try it on the app, but not when using
the Slack client. See: https://github.com/Unleash/unleash/pull/8222


![image](https://github.com/user-attachments/assets/31eb6296-5d4b-4400-8db0-5eb7437dd2ff)


![image](https://github.com/user-attachments/assets/ac177415-78da-4c4b-864b-0c7a1668f6b5)
2024-09-24 08:45:08 +01:00
Jaanus Sellin
272052c59b
feat: complete java example (#8227) 2024-09-24 09:55:54 +03:00
Mateusz Kwasniewski
fee2143edf
feat: Personal flags UI component (#8221) 2024-09-24 08:42:49 +02:00
Mateusz Kwasniewski
3ef5d06f00
chore: orval gen (#8220) 2024-09-23 16:41:55 +02:00
Thomas Heartman
27c977dcf7
display setup complete message when project is onboarded (#8217)
This PR adds the new `ProjectSetupComplete` component (the name can be
changed) that we display when a project has been set up with a flag and
a connected SDK.

It uses the project overview to check the project's onboarding status.


![image](https://github.com/user-attachments/assets/9e7c5986-46ee-4aa1-9c35-a921f3402468)
2024-09-23 14:23:22 +02:00
gitar-bot[bot]
5dd0fb9f44
[Gitar] Cleaning up stale flag: projectListImprovements with value true (#8212)
Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2024-09-23 13:07:59 +02:00
Jaanus Sellin
9f5e909436
feat: onboarding can be now closed (#8215)
The boxes were merged and now the whole thing can be closed.


![image](https://github.com/user-attachments/assets/45ec680f-64df-4877-92cb-33fef506f0ad)
2024-09-23 13:52:00 +03:00
Mateusz Kwasniewski
f45b7a07b4
fix: onboarding img asset path (#8213) 2024-09-23 12:28:38 +02:00
Jaanus Sellin
553e04994e
fix: now onboarding will show up in correct times (#8214)
Feature table was not appearing, when onboarding flag was off.
2024-09-23 12:57:47 +03:00
gitar-bot[bot]
1296327c03
[Gitar] Cleaning up stale flag: archiveProjects with value true (#8201) 2024-09-23 11:51:55 +02:00
Mateusz Kwasniewski
375395bba7
feat: welcome dialog with unleash concepts (#8199) 2024-09-20 15:53:03 +02:00
gitar-bot[bot]
bb32336408
[Gitar] Cleaning up stale flag: newEventSearch with value true (#8196)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co)
  
  ---
This automated PR was generated by [Gitar](https://gitar.co). View
[docs](https://gitar.co/docs).

---------

Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-20 14:48:33 +03:00
Jaanus Sellin
ebcdd67db0
feat: onboarding flow will not break (#8198)
1. Now onboarding flow will not break when feature is created
2. Now the bottom table will appear as soon as first feature appears
3. ExistingFlag component was reworked to match the new UX


![image](https://github.com/user-attachments/assets/2022f4ad-246c-47f9-927f-726f72da5e97)
2024-09-20 14:31:11 +03:00
Mateusz Kwasniewski
87b997698b
feat: placeholder flag metrics chart (#8197) 2024-09-20 11:05:53 +02:00
Melinda Fekete
0587203ad6
chore: update project onboarding UI text (#8189) 2024-09-20 10:30:33 +02:00
Mateusz Kwasniewski
10ec2e7de5
feat: personal dashboard connect sdk (#8190) 2024-09-19 17:01:33 +02:00
Mateusz Kwasniewski
f66854a0f0
feat: personal dashboard project selection (#8188) 2024-09-19 15:25:11 +02:00
Jaanus Sellin
95969456f6
chore: finalize python sdk example (#8186)
Fix Python example and add isEnabled example.
2024-09-19 15:03:03 +03:00
Nuno Góis
205b59ddee
chore: event timeline (#8176)
https://linear.app/unleash/issue/2-2657/implement-a-first-iteration-of-an-horizontal-event-timeline

This implements the very first iteration of our event timeline.

This is behind a feature flag, which when enabled shows the new timeline
at the top of our event log page.

It is missing some features, like:
- Placement: It should show up as an option in the header, not in the
event log;
- Tooltip: It should show proper tooltips for all the events that we're
displaying;
- Grouping: It should group together events that occurred in a short
span of time;
 - Signals: It should show signals along with the events;

Here's how it currently looks like, with some example events, in order
from left to right:
 - A flag was disabled more than 30 min ago;
 - A flag was then enabled;
- A segment was updated (didn't have an icon for segments, so I picked
one);
 - A strategy was updated;
 - A flag was created;


![image](https://github.com/user-attachments/assets/1716d8c0-e491-47cc-895b-e02d019c9e80)

![image](https://github.com/user-attachments/assets/a1b5c6b9-86d6-43f7-8a36-5661625e41d6)

(Time passed since I took the first screenshot, so you can see the
events "moved" to the left slightly in the dark theme screenshot)

I have some concerns about the low contrast of `neutral` variant events,
especially in dark mode. Maybe we should consider using `error` instead,
for red? Or maybe add a border to our event circles?

I specifically changed my environment to be "development" for the
screenshots. The default selection is the first enabled environment that
is `type=production`, which in my case is "production".

Here are our filters:
 - Time Span

![image](https://github.com/user-attachments/assets/b0649d7b-c6c2-482f-918f-b35b23184578)
 - Environment

![image](https://github.com/user-attachments/assets/33c788d6-9d76-4afd-b921-3c81eda4e1c5)

Here are a few more screenshots, with the different time spans (zooming
out, since we're increasing the time span):


![image](https://github.com/user-attachments/assets/16003a67-039e-43ad-a4db-617f96ec5650)

![image](https://github.com/user-attachments/assets/6d50b53f-1fc0-4e07-96a6-6843629ecb2d)

![image](https://github.com/user-attachments/assets/e6cc6b10-ff02-44db-82d5-346fba8eb681)

![image](https://github.com/user-attachments/assets/1181b8d7-a951-4e5a-aa5b-bd9fdbd16a7a)

![image](https://github.com/user-attachments/assets/7a43c5a0-c51c-4861-952a-2c09968263d6)

![image](https://github.com/user-attachments/assets/5bfda117-5524-435b-b0d1-a8b1bd446a36)

Again, when zooming out, some events should be grouped together, but
that's a task for later.
2024-09-19 12:14:10 +01:00
Mateusz Kwasniewski
70e95e66a8
feat: my projects ui stub (#8185) 2024-09-19 12:37:35 +02:00
Mateusz Kwasniewski
8e037a335f
feat: personal dashboard route (#8173) 2024-09-19 09:59:07 +02:00
Mateusz Kwasniewski
d5076f0772
fix: archive project curl (#8181) 2024-09-19 09:58:31 +02:00
Mateusz Kwasniewski
7274f4954a
fix: connect sdk description bg color (#8171) 2024-09-18 14:08:31 +02:00
Nuno Góis
85b67ae330
chore: add eventTimeline feature flag (#8159)
https://linear.app/unleash/issue/2-2658/create-eventtimeline-feature-flag

Adds a new `eventTimeline` feature flag for the new event timeline
feature.

I think `eventTimeline` is an appropriate name given the feature
description and the way it is evolving, but I'm open to suggestions.
~~This also assumes that this feature will target OSS.~~ Confirmed that
this will be a premium feature.
2024-09-18 08:55:50 +01:00
Mateusz Kwasniewski
9d519efc74
feat: swift and flutter sdk snippets (#8149) 2024-09-17 08:47:57 +02:00
Jaanus Sellin
212203f7c7
chore: PHP SDK example fix (#8146) 2024-09-16 14:29:03 +03:00
Jaanus Sellin
f76f754eca
chore: update go sdk examples (#8145) 2024-09-16 13:15:26 +03:00
Fredrik Strand Oseberg
0f8316a6de
fix: invert logic (#8135)
The EEA flag is present in enterprise instances which currently is
blocking enterprise customers from accessing this button. This PR
inverts the logic that was changed in #7796.
2024-09-11 18:12:37 +02:00
Mateusz Kwasniewski
152e074c2d
test: improve onboarding test (#8121) 2024-09-06 13:45:22 +02:00
Mateusz Kwasniewski
0fa3738412
chore: adjust language names (#8117) 2024-09-06 12:45:22 +02:00
Mateusz Kwasniewski
e8fee92838
feat: explain complete feature name (#8120) 2024-09-06 12:45:06 +02:00
Jaanus Sellin
028cf06f6c
feat: make node example more consistent (#8111) 2024-09-06 13:22:23 +03:00
Jaanus Sellin
b6e22d6178
feat: new onboarding welcome screen logic (#8110)
1. We will not show grid until 2 flags exist
2. Now new feature creation button will be always displayed on top with
different style
3. Moved some text around


![image](https://github.com/user-attachments/assets/6cfc2152-b52d-479c-8a2e-988c9e8b79ad)
2024-09-06 13:15:28 +03:00
Thomas Heartman
f0ba4e5180
fix: allow you to save default strategies with the right permissions (#8114)
Allow you to edit default strategies in the UI if you have the
update_project or project_default_strategy_write permissions. These are
the same permissions that we use in the API.

Previously, we used the update_feature_strategy permission here, but
that one is intended to be used for updating strategies belonging to
actual flags.

One of the trickier bits here is that we use the `StrategyVariants`
component, which previously had baked in the permission required
(update_feature_environment_variants). Because the permissions are
different for the default strategy, I updated the component to make it
configurable, but for the default to be the old permission (so that
other uses aren't affected).
2024-09-06 12:00:46 +02:00
Mateusz Kwasniewski
0b656db80a
test: onboarding test with existing key (#8116) 2024-09-06 11:50:52 +02:00
Thomas Heartman
00e63609d4
fix: allow you to see default strategies if you have write access (#8113)
Previously, you needed read access specifically to see default
strategies. So even if you could write default strategies, you
couldn't access them in the UI without the read permission too.

This changes it so that you can see default strategies if you have
write permission.
2024-09-06 11:49:22 +02:00
Thomas Heartman
7e52da11bc
fix: Also display strategy variant information on default strategies (#8115)
This change copies (and then simplifies) the strategy variant display
logic from

`frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/EnvironmentAccordionBody/StrategyDraggableItem/StrategyItem/StrategyItem.tsx`
and inserts it into the `ProjectEnvironmentDefaultStrategy` component.

Before:

![image](https://github.com/user-attachments/assets/c00098c3-3161-4a89-a6cf-8db711b4fb3e)


After:

![image](https://github.com/user-attachments/assets/4fdd46f1-97a4-4344-98e1-16c842947a1c)
2024-09-06 11:47:59 +02:00
Mateusz Kwasniewski
09e55c10c2
feat: onboarding step badges (#8102) 2024-09-05 15:21:27 +02:00
Nuno Góis
355b3eb58a
chore: remove unused SCIM setting - assumeControlOfExisting (#8101)
This property is unused and should be removed.

This fixes a logged schema error:

```
Invalid response: {
    "schema": "#/components/schemas/scimSettingsSchema",
    "errors": [
        {
            "instancePath": "",
            "schemaPath": "#/required",
            "keyword": "required",
            "params": {
                "missingProperty": "assumeControlOfExisting"
            },
            "message": "must have required property 'assumeControlOfExisting'"
        }
    ]
}
```
2024-09-05 13:45:20 +01:00
Mateusz Kwasniewski
2daa0cd8ca
feat: onboarding stepper (#8100) 2024-09-05 14:11:39 +02:00
Jaanus Sellin
01fb748c01
feat: connection status bubble (#8099)
Fully working cycle


![image](https://github.com/user-attachments/assets/cf20788b-29fa-4489-91e7-7db9f592da9b)
2024-09-05 13:56:25 +03:00
Mateusz Kwasniewski
9f591f0cda
feat: change sdk action (#8098) 2024-09-05 11:55:37 +02:00
Mateusz Kwasniewski
62d03d35cd
feat: check flag status snippet (#8097) 2024-09-05 11:17:42 +02:00
Tymoteusz Czech
c2c865273e
fix: align short owner username on project card (#8093) 2024-09-05 10:16:38 +02:00
Jaanus Sellin
4b1de563f7
feat: add sdk example box (#8092)
![image](https://github.com/user-attachments/assets/472dcbb2-d981-4d7c-8bbf-b97a6ee4c186)
2024-09-05 10:35:43 +03:00
Mateusz Kwasniewski
b1ce02369a
feat: copy to clipboard sdk snippet (#8083) 2024-09-05 08:53:52 +02:00
Mateusz Kwasniewski
ff31013c6d
feat: Sdk snippets in test connection phase (#8082) 2024-09-04 15:43:36 +02:00
Mateusz Kwasniewski
5c4d0bf99b
feat: navigate between all stages (#8080) 2024-09-04 13:58:15 +02:00
Mateusz Kwasniewski
ba8d043f3c
feat: connect sdk concepts (#8079) 2024-09-04 12:31:55 +02:00
Jaanus Sellin
48ddd255d6
feat: connect welcome to sdk dialog (#8078)
Now welcome screen is connected to sdk dialog.
2024-09-04 13:19:08 +03:00
Jaanus Sellin
f41a688edb
feat: welcome to project onboarding status rendering (#8076)
![image](https://github.com/user-attachments/assets/8a828f95-10bd-4294-b2f4-1d7f4e7f1a3d)
2024-09-04 12:17:33 +03:00
Mateusz Kwasniewski
206e3aef62
feat: connect sdk icons (#8075) 2024-09-04 10:00:57 +02:00
Mateusz Kwasniewski
8c5a3e03a4
feat: can select client and frontend sdk (#8066) 2024-09-04 08:26:16 +02:00
Mateusz Kwasniewski
3f24728693
feat: Select sdk onboarding pt 1 (#8065) 2024-09-03 16:37:20 +02:00
Mateusz Kwasniewski
e70b09ae7b
refactor: extract generate api key stage into component (#8061) 2024-09-03 14:58:35 +02:00
Nuno Góis
c865fd4fbb
fix: reduce integration events requests (#8055)
Cuts the total amount of integration event requests in half when
browsing the integrations page, by only fetching the 20 latest events
for each configured integration when it's actually needed (open modal).
2024-09-03 12:29:33 +01:00
Mateusz Kwasniewski
6a51a0b14a
feat: Onboarding connect api token generation (#8054) 2024-09-03 11:28:16 +02:00
Jaanus Sellin
29af716952
chore: remove operator upgrade alert (#8053)
This was introduced in v4.9 and most likely people have upgraded
already. Removing.
2024-09-03 12:18:19 +03:00
Mateusz Kwasniewski
82f9783fe6
feat: connect sdk step 1 (#8042) 2024-09-02 15:58:00 +02:00
Tymoteusz Czech
6030900b40
refactor: replace IProjectCard with openapi type (#8043)
Makes type consistent between frontend and schema generated from backend.
2024-09-02 13:25:28 +00:00
Tymoteusz Czech
76ffdb2cd3
chore: update Frontend schema (#8037)
update types, fix frontend types issues in insights and archive
2024-09-02 14:41:17 +02:00
Jaanus Sellin
e4fcb252d1
feat: welcome to your project component (#8039)
Currently displaying always when flag enabled.


![image](https://github.com/user-attachments/assets/e4c48595-b2d9-4093-af98-360d5856e7d5)
2024-09-02 15:09:00 +03:00
Gastón Fournier
d7b1e70e68
chore: reorganize product data in footer (#8030)
## About the changes
Instead of having the plan at the end, move it next to the product name
and display the build number at last
2024-09-02 11:53:57 +02:00
Christopher Kolstad
0f5e4dc96b
task: remove upgrade edge banner. (#8032)
All customers but one are now upgraded, and this banner no longer adds
value, we also have the outdated SDK banner, which can fill in if
needed.
2024-09-02 10:50:19 +02:00
Tymoteusz Czech
eb55067983
fix: project archive card (#8024)
Fix archived project card after new projects list refactor. Archive card was not showing button actions in footer.
2024-09-02 10:13:59 +02:00
Gastón Fournier
bb5aa64756
feat: display the build number as extra data (#8022)
## About the changes
Show the build number between parenthesis separated from the version.

When there's no build number:

![image](https://github.com/user-attachments/assets/408c6953-9af5-4c8d-88e2-50eb17016ee1)

When there is:

![image](https://github.com/user-attachments/assets/b5481294-651a-422c-9699-b93b3d8cf4be)
2024-08-30 16:36:00 +02:00
Tymoteusz Czech
79fccbd8f3
refactor: ts checking conditionallyrender props (#7840)
Fix issues found by TS checking after removing ConditionallyRender
2024-08-30 13:39:11 +02:00
Tymoteusz Czech
a918590d1e
fix: boolean logic for feature last seen toolbar (#8016) 2024-08-30 13:23:08 +02:00
gitar-bot[bot]
b26fb8992d
[Gitar] Cleaning up stale flag: killInsightsUI with value false (#8002)
Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2024-08-30 12:32:51 +02:00
Tymoteusz Czech
d626defc93
fix: project badge alignment (#8019) 2024-08-29 16:49:46 +02:00
Tymoteusz Czech
07abb60966
Feat/improve projects list (#8018) 2024-08-29 14:39:44 +00:00
Tymoteusz Czech
8b68a0657f
feat: projects list sorting (#8011)
Ability to sort projects.
2024-08-29 15:43:16 +02:00
Tymoteusz Czech
8923e28d83
feat: new project card (#7992) 2024-08-28 18:26:41 +02:00
gitar-bot[bot]
031a2e805a
[Gitar] Cleaning up stale flag: timeAgoRefactor with value true (#7997)
Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2024-08-28 11:12:27 +00:00
Mateusz Kwasniewski
3a9b9e9e55
feat: fixed full mode navbar width (#8001) 2024-08-28 11:57:29 +02:00
Mateusz Kwasniewski
bed4f66fa2
feat: fixed full mode navbar width (#7999) 2024-08-28 11:07:55 +02:00
Mateusz Kwasniewski
d5e4544fad
feat: new in unleash summary text (#7996) 2024-08-28 10:30:03 +02:00
Mateusz Kwasniewski
c8f20196e0
feat: Signals preview img (#7993) 2024-08-28 08:24:12 +02:00
Mateusz Kwasniewski
09e619ee25
fix: copy strategy should always add a new strategy (#7994) 2024-08-28 08:23:30 +02:00
Mateusz Kwasniewski
c69036c5a9
feat: new in unleash tooltip (#7991) 2024-08-27 15:47:55 +02:00
Tymoteusz Czech
742504793c
refactor: make avatar group more customizable (#7989) 2024-08-27 14:37:45 +02:00
Tymoteusz Czech
25617f7a24
refactor: prepare project card iteration (#7990)
Copy/rename files in preparation for new ProjectCard iteration.
2024-08-27 14:11:07 +02:00
Jaanus Sellin
fc86f5b2fe
feat: align insights charts (#7984)
Now the left widget will use the same that as the last data point on the
right chart.
With this change, flags/users object never needs to be passed in.

**Next step is to remove the flags/users from the endpoint.**

Previous


![image](https://github.com/user-attachments/assets/b938e568-e32e-4ae8-beb9-d8de8aa2c5ec)

Now


![image](https://github.com/user-attachments/assets/182dfbbb-bf2e-42f9-a024-0c545c604f74)
2024-08-27 11:06:08 +03:00
Mateusz Kwasniewski
07f9935433
feat: make hide nav info always visible (#7981) 2024-08-26 15:57:33 +02:00
Tymoteusz Czech
80a9591d37
Fix/metrics chip adhock improvement (#7976)
On flag metrics page
2024-08-26 12:28:21 +02:00
Jaanus Sellin
08b0bfe291
chore: move flags widget 2 widgets down (#7977)
Moving flags 2 widgets down
2024-08-23 16:35:39 +03:00
Jaanus Sellin
f7d5c8e12d
feat: introduce new icons for import/export (#7970)
We found good one for export from MUI, but needed to created similar one
for import.


![image](https://github.com/user-attachments/assets/f8ed2f07-5c8b-4829-a298-4b5e7311b059)
2024-08-22 15:04:50 +03:00
gitar-bot[bot]
4615ff40ce
[Gitar] Cleaning up stale flag: resourceLimits with value true (#7964)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co)
  
  ---
This automated PR was generated by [Gitar](https://gitar.co). View
[docs](https://gitar.co/docs).

---------

Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-08-22 13:20:53 +02:00
Thomas Heartman
b0541a0af2
feat: add remaining resource usage to instance stats (#7958)
Updates the instance stats endpoint with 
- maxEnvironmentStrategies
- maxConstraints
- maxConstraintValues

It adds the following rows to the front end table:
- segments (already in the payload, just not used for the table before)
- API tokens (separate rows for type, + one for total) (also existed
before, but wasn't listed)
- Highest number of strategies used for a single flag in a single
environment
- Highest number of constraints used on a single strategy
- Highest number of values used for a single constraint


![image](https://github.com/user-attachments/assets/57798f8e-c466-4590-820b-15afd3729243)
2024-08-22 13:09:26 +02:00
Jaanus Sellin
cb8d689bd8
feat: command menu docs (#7963)
Also rebranded command bar to command menu, because that seems more
suitable.
Command bar is more like a horizontal/vertical list/bar of icons, like
sidebar. Command menu is more of a dropdown.


https://unleash-docs-git-command-docs-unleash-team.vercel.app/reference/command-menu

---------

Co-authored-by: melindafekete <melinda.fekete@getunleash.io>
2024-08-22 14:07:15 +03:00
Jaanus Sellin
4a4dafcc3f
chore: remove create feature component (#7959)
After we implemented new feature flag creation flow, this are not used
anymore.

Creation is now handled by **CreateFeatureDialog**.

Also edit component can be minified, because it does not need so many
fields anymore.
2024-08-22 11:30:41 +03:00
Melinda Fekete
341703978a
docs: Update projects docs (#7941) 2024-08-21 14:56:17 +02:00
gitar-bot[bot]
3a15fa7689
[Gitar] Cleaning up stale flag: integrationEvents with value true (#7940) 2024-08-21 14:25:24 +02:00
Mateusz Kwasniewski
2a13139215
fix: project owner name overflow (#7949) 2024-08-21 13:12:42 +02:00
Tymoteusz Czech
6c5ce52470
Refactor: Remove react-timeago (#7943)
Remove dependency 🫡
2024-08-21 12:03:03 +02:00
gitar-bot[bot]
43100f9561
Cleaning up stale flag: insightsV2 with value true (#7896)
Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2024-08-21 12:01:35 +02:00
Mateusz Kwasniewski
ee1d8ee8cd
fix: misc fixes for project archive (#7948) 2024-08-21 10:34:13 +02:00
Mateusz Kwasniewski
51f61d5103
feat: prevent revive feature to archived project (#7939) 2024-08-20 15:09:37 +02:00
David Leek
37dd2ebc4c
fix: only show addon delete button when editing addons (#7930) 2024-08-20 14:36:27 +02:00
Tymoteusz Czech
0d97f8b7c1
fix: react-timeago issue (#7936) 2024-08-20 14:03:05 +02:00
Thomas Heartman
8e2ae6c6c7
fix: update the customer success email for limits (#7933)
The previously used email address doesn't actually exist 😳 It was taken
from the sketches and we just never verified it.
2024-08-20 11:58:25 +02:00
Tymoteusz Czech
c363fdcfc4
Expired invite link style (#7928) 2024-08-20 09:52:59 +02:00
Mateusz Kwasniewski
4e11e57f7f
feat: project actions count metric (#7929) 2024-08-20 09:46:39 +02:00
gitar-bot[bot]
662c7ab4dc
[Gitar] Cleaning up stale flag: changeRequestPlayground with value true (#7920) 2024-08-19 15:33:55 +02:00
Tymoteusz Czech
004038e872
update project archive and revive dialogs (#7918) 2024-08-19 13:33:00 +00:00
Thomas Heartman
cf3379d0b3
fix: avoid awkward overlaps of group cards with lots of members, long project names, and small cards (#7915)
This PR updates the styling of the group cards to better handle edge
cases where you have a lot of assigned projects, long project names,
lots of members, etc.

In particular, it does the following things:
- aligns the avatars along the bottom of the card, so that even if
there's a lot of projects, the avatars stay close to the bottom edge
- adds word breaks for the project names, so that long names can break
when they need to
- adds some spacing between the two columns in the bottom row, so that
even when you they get close, they never quite touch.

Note: there is one more thing I'd like to address in a follow up: as
shown in the top row of the after image, there's some extra wrapping of
the first "This group has no users", even though it has the room to
grow. I'll keep looking into this and make a follow-up.

Before:

![image](https://github.com/user-attachments/assets/d612a1de-0aa7-4813-8e73-9345f449238d)

After:


![image](https://github.com/user-attachments/assets/a85308b3-dc42-4777-ab1e-4a89429507d2)
2024-08-19 12:58:46 +00:00
Mateusz Kwasniewski
141720d9b8
feat: adjust archived card styling (#7917) 2024-08-19 14:22:58 +02:00
Mateusz Kwasniewski
2050cb0b76
feat: static link to archived flags in archived project (#7913) 2024-08-19 11:24:39 +02:00
Thomas Heartman
abd077aaf7
chore: add flags projectListImprovements and useProjectReadModel (#7905)
These are both related to the work on the project list improvements
project.

The `projectListImprovements` flag will be used to enable disable the
new project list improvements.

The `useProjectReadModel` flag will be used to enable/disable the use
of the new project read model and is mostly a safety feature.
2024-08-16 11:54:11 +02:00
Tymoteusz Czech
b9ea24be8d
fix: orphaned token label only for items without projects (#7901)
Orphaned token label was incorrectly assigned.
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-08-16 10:58:44 +02:00
Tymoteusz Czech
f2e2952c31
fix: projects archive search (#7898)
Filter projects when searching
2024-08-15 16:19:29 +02:00
Mateusz Kwasniewski
a3decb543f
feat: Show project archived message (#7899) 2024-08-15 14:56:12 +02:00
gitar-bot[bot]
977f969b80
[Gitar] Cleaning up stale flag: improveCreateFlagFlow with value true (#7895)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co)
  
  ---
This automated PR was generated by [Gitar](https://gitar.co). View
[docs](https://gitar.co/docs).

---------

Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2024-08-15 15:53:36 +03:00
gitar-bot[bot]
413df42555
[Gitar] Cleaning up stale flag: commandBarUI with value true (#7894)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co)
  
  ---
This automated PR was generated by [Gitar](https://gitar.co). View
[docs](https://gitar.co/docs).

---------

Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2024-08-15 14:29:07 +03:00
Tymoteusz Czech
3baeb4c541
feat: dialogs for project revive and delete (#7863)
Dialog needed to confirm revive/delete actions
2024-08-15 07:25:49 +00:00
Tymoteusz Czech
1e66fedb7e
chore: update openapi (#7881)
Auto-generated types
2024-08-14 14:31:32 +00:00
Thomas Heartman
f59b77571c
chore: code cleanup: event log filters (#7870)
Adds tests for event log filters (to ensure we show the right filters)
and refactors the implementation of eventlogfilters.

Primary goal of refactoring:
- Make it so that all filters are created in one single list (instead of
injected from different variables)
- Avoid making a requests for features (and to a lesser extent:
projects) if you can't use them for filters
- Improve code structure
2024-08-14 15:27:22 +02:00
Thomas Heartman
dad30a08f0
fix: cap number of collaborators displayed (#7879)
Caps the number of collaborators to display to a constant (currently
set to 99).

Above that, it'll always show "+99".

However, we also add a tooltip that shows you a prettified version of
the extra collaborators (using the `millify` package that we already use
for metrics)

Screenies:

< 1000 collaborators:

![image](https://github.com/user-attachments/assets/b030e77e-e23d-4cac-a1d1-7841a4ba86e7)


1000 - 1M collaborators:

![image](https://github.com/user-attachments/assets/b72ca22e-513d-4d69-b78d-c675951c894a)

1M+ collaborators:

![image](https://github.com/user-attachments/assets/6341e87d-17da-4359-bce3-e31df637cd5c)

Update, it now shows the total number of collaborators instead of the
overflow:

![image](https://github.com/user-attachments/assets/67a459c5-91b8-475d-b0e3-c5c19aaf62d7)
2024-08-14 13:27:05 +00:00
Simon Hornby
f276728688
feat: allow editing root role/description on SCIM group (#7874) 2024-08-14 15:11:56 +02:00
Thomas Heartman
5e82e47d94
fix: add collaborators to ignored props for feature diff notif (#7877)
Fixes a problem with demo saying you've got outdated data when someone
else has worked with ya
2024-08-14 13:46:03 +02:00
Jaanus Sellin
778413d4c0
feat: plausible for events export (#7868)
Plausible for events exports. And small cleanup.
2024-08-14 11:56:03 +03:00
Thomas Heartman
764d03767b
chore: begin front end cleanup (#7865)
Begins cleaning up the front end.

Removes the "legacy" event log component in favor of only using the new
one. What we do is simply not to show the filters if you're not on
enterprise.

This means that we'll get pagination (and maybe exports?) for everyone.

It also means that you can reverse-engineer the filters and use them
even on non-enterprise, as long as you're happy editing URLs manually.
However, putting it behind a flag on the front end always exposed that
kind of risk, so I don't think this is a bad move.
2024-08-14 10:03:28 +02:00
Jaanus Sellin
8ce594ba52
feat: exporting events as csv (#7860)
Adding csv library that also makes nested properties into columns.
2024-08-13 16:28:03 +03:00
Tymoteusz Czech
ccb29a5acf
refactor: project archive card (#7859)
- Refactored "favorites" action, and fixed issue with "favorite" prop
- Refactored "owners" - simplified footer
2024-08-13 15:19:13 +02:00
Thomas Heartman
9f0fd7e200
chore: create skeleton loading for new event screen (#7861)
Updates the new event log to show a skeleton loading screen while the
search results are being fetched.

The placeholder size is based on the standard event size.


![image](https://github.com/user-attachments/assets/fce51445-2b73-40dd-9452-29a415ec278a)
2024-08-13 15:18:47 +02:00
Tymoteusz Czech
f2b7e0278d
Projects archive UI (#7842)
Closes
[issue/1-2666](https://linear.app/unleash/issue/1-2666/archived-projects-view)
2024-08-13 14:33:11 +02:00
Gastón Fournier
ea92081545
fix: remove another scimApi flag (#7858) 2024-08-13 14:03:52 +02:00
Gastón Fournier
376012ddd1
fix: remove flag from UI (#7857) 2024-08-13 11:44:16 +00:00
Thomas Heartman
1b892979d3
feat: add event creators data to filter (#7822)
Adds event creator data to the event creator filter.

It uses a new useEventCreators hook to fetch event creators from the new
API, and uses that to populate the event creators filter.
2024-08-13 10:41:55 +02:00
Thomas Heartman
245bdeae1e
chore: generate orval for event creators (#7823)
Updates our orval config to include event creator data
2024-08-12 15:07:26 +02:00
Jaanus Sellin
b194393dae
feat: export events as json (#7841)
![image](https://github.com/user-attachments/assets/7e24339d-fa59-4b80-a322-05323e01eabe)
2024-08-12 15:30:20 +03:00
Thomas Heartman
fa96ff1450
fix: display feature naming patterns in dialog (#7837)
Updates the dialog form template to include a `namingPattern` prop that
can be used to display the naming pattern of whatever the form is used
for.

Also updates the create feature dialog to display the naming pattern in
the current project.

The naming pattern component re-uses the pattern that we have in place
for feature naming patterns, but puts it in an expandable dialog
instead.

Screenies:

Naming pattern closed:

![image](https://github.com/user-attachments/assets/145e4268-1aa0-4c1b-8f08-97857447e2f5)


![image](https://github.com/user-attachments/assets/1613c846-e7d4-41c8-a1c8-a66ab87b6e5f)



Naming pattern open:

![image](https://github.com/user-attachments/assets/1aa37162-500b-4b83-926f-07aa777e8017)
2024-08-12 13:56:07 +02:00
Tymoteusz Czech
8091987aaa
manually clear DependencyActions (#7827) 2024-08-12 12:00:46 +02:00
Tymoteusz Czech
e77bb1b2e7
Fix: time to production (#7835)
- filter out time to production data points of `0 days to production`
- allow for gathering data for quickly enabled feature flags
2024-08-12 09:47:06 +00:00
Thomas Heartman
99f878d725
fix: don't always fetch all flags on project flag screen (#7834)
There's a bug where the UI will fetch all features every time you load a
project screen (including every time you filter the project results).

The reason is that the create flag dialog was rendered (just not open)
every time. To solve it, we instead wrap it in an extra component that
prevents all the fetching and setup from running when the dialog isn't
open.

Additionally, we'll lower the page size for the global fetch limit to 1,
so that we send less data.
2024-08-12 11:07:36 +02:00
gitar-bot[bot]
5aaa4920dd
chore: [Gitar] Cleaning up stale flag: featureCollaborators with value true (#7820)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co)
  
  ---
This automated PR was generated by [Gitar](https://gitar.co). View
[docs](https://gitar.co/docs).

---------

Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-08-09 11:12:26 +02:00
Thomas Heartman
258909db39
fix: Update avatar usage in change requests (#7818) 2024-08-09 09:54:16 +02:00
Alvin Bryan
274d314b28
chore: Fixed typo (#7774)
Looks like it got missed during the Great Feature Flag Renaming 😄
2024-08-08 13:53:33 +02:00
Mateusz Kwasniewski
b65e593c23
chore: remove featureLifecycle and featureLifecycleMetrics flags (#7808) 2024-08-08 13:45:23 +02:00
Mateusz Kwasniewski
3fe385e127
chore: remove flagCreator flag (#7807) 2024-08-08 12:19:32 +02:00
Mateusz Kwasniewski
ce30c069ee
fix: playground env column spacing made bigger (#7806) 2024-08-08 11:42:52 +02:00
Tymoteusz Czech
cb4e447d69
fix: show environments page as enterprise feature (#7796)
Not available with menu, URL only, and actions are not working with OSS
and Pro.
2024-08-08 10:03:02 +02:00
Mateusz Kwasniewski
a01305040d
feat: archive project form (#7797) 2024-08-08 09:29:28 +02:00
Tymoteusz Czech
4daede8e1c
fix: allow for empty groupId in form (#7798)
`groupId` parameter because of the change in validation wasn't parsed
correctly. Intent was to fill it when it is empty, when the form is loaded.
By mistake the same logic applies when you manually remove all
characters from the text field.
2024-08-07 16:34:30 +02:00
Thomas Heartman
ff9b7298b6
feat: add paging to event log (#7793)
Adds sticky pagination to the event log:


![image](https://github.com/user-attachments/assets/c426f30d-bb64-44a5-b3b4-8c295207b249)

This PR uses the sticky pagination bar that we use on other tables to
navigate the event search results.

## Decisions / discussion points

The trickiest issue here is how we calculate the next and previous page
offsets. This is tricky because we don't expose the page number to the
API, but the raw offset itself. This abstraction makes it possible to
set an offset that isn't a multiple of the page size.

Say the page size is 25. If you manually set an offset of 30 (through
changing the URL), what do you expect should happen when you:
- load the page? Should you see results 31 to 55? 26 to 50?
- go to the next page? Should your next offset be 55 or 50?
- previous page: should your previous page offset be 5? 25? 0?

The current implementation has taken what I thought would be the easiest
way out: If your offset is between two multiples of the page size, we'll
consider it to be the lower of the two.
- The next page's offset is the next multiple of the page size that is
higher than the current offset (50 in the example above).
- The previous page's offset will be not the nearest lower page size,
but the one below. So if you set offset 35 and page size 25, your next
page will take you back to 0 (as if the offset was 25).

We could instead update the API to accept `page` instead of offset, but
that wouldn't align with how other tables do it.

Comparing to the global flags table, if you set an offset that isn't a
multiple of the page size, we force the offset to 0. We can look at
handling it like that in a follow-up, though I'd argue that forcing it
to be the next lower multiple of the page size would make more sense.

One issue that appears when you can set custom offsets is that the
little "showing x-y items out of z" gets out of whack (because it only
operates on multiples of the page size (seemingly))

![image](https://github.com/user-attachments/assets/ec9df89c-2717-45d9-97dd-5c4e8ebc24cc)

## The Event Log as a table

While we haven't used the HTML `table` element to render the event log,
I would argue that it _is_ actually a table. It displays tabular data.
Each card (row) has an id, a project, etc.

The current implementation forces the event log search to act as a table
state manager, but we could transform the event list into an events
table to better align the pagination handling. The best part? We can
keep the exact same design too. A table doesn't have to _look_ like a
table to be a table.
2024-08-07 15:08:01 +02:00
Thomas Heartman
4fac38ce01
fix: select an item only from the filtered list of options (#7789)
Fixes a bug where the `handleSelection` function would select the
wrong item under certain conditions.

Because we always sent the unfiltered list of options to the function,
but took the index of the filtered items, the index would be off when
you have filtered the list and items before the selected items were
hidden.

This addresses that and also ports in some improvements I made when
setting up the config buttons for the new dialogs:

1. You can now use the space bar to select items that you have
focused (this is consistent with regular form interactions for
checkboxes)

2. When you have added text to the search field, pressing Enter will
select the top-most item (this is consistent with how these fields
work in linear, for instance) as long as your focus is still in the
search field. If you have moved it to the list, enter will still
select an item on that list as expected.

Potential other addition: if you press "Enter" with an empty search
field, we could close the box but keep your selection the same. Again,
this is how Linear does it, but I don't personally know what I'd
expect to happen there, so I'm happy to leave it as is.
2024-08-07 14:46:37 +02:00
Thomas Heartman
bb84ef21ad
fix: don't delete projects screen from history (#7787)
Fixes a bug in the navigation when you create a project. It used to be
that we'd replace the current entry in the browser history when we
took you to a separate form for it. However, now that we instead
use a dialog, we don't want to replace the history.

Before: if you created a project and navigated back, you'd be taken to
the page you were at BEFORE you went to the projects page, whether
that was in Unleash or otherwise.

Now you'll be taken back to the projects page.
2024-08-07 09:31:50 +02:00
Thomas Heartman
d70c279d3d
refactor: split EventLog into separate components and hook up new Event search (#7777)
Hooks up the new Event search and filtering capabilities to the new
Event Log component. In doing so, it also splits the existing EventLog
component into two: `LegacyEventLog` and `NewEventLog`. The naming is
probably temporary, as the old EventLog isn't really legacy yet. But we
can rename them later.

The other half of #7768 .
2024-08-07 08:48:59 +02:00
Thomas Heartman
2556bd0cf6
feat: Front end filter state management for event search (#7776)
This is just the state management part of #7768.

Adds a useEventLogSearch hook.

All the filters work except for the date filters. They don't work
because the query parameters in the API don't match what's here, but an
update to the API is coming in a follow-up.

It's a little tricky to handle this because the three different event
logs should have slightly different filters, which makes making the type
checker happy a bit of a pain. However, I'd like to revisit this in a
follow-up PR.
2024-08-06 15:11:10 +02:00
Thomas Heartman
76bc7bf250
refactor: rename createdAtFrom/To to from/to (#7773)
Update the query parameter of the new event search API to match the
query parameters of the insights API
2024-08-06 15:02:44 +02:00
Mateusz Kwasniewski
f9665233cc
chore: archive projects flag (#7772) 2024-08-06 14:59:49 +02:00
Mateusz Kwasniewski
41c6d06093
fix: missing space in delete project message (#7771) 2024-08-06 14:11:37 +02:00
Tymoteusz Czech
29975a62c4
feat: link to release notes from orphaned tokens (#7731)
Adding a link "Read more in [release
notes](https://github.com/Unleash/unleash/releases/tag/v6.1.0)" to
orphaned tokens.

This needs to be added on v6.1, with the following changelog entry:


> **SDK tokens for deleted projects**
> 
> In previous versions of Unleash, when a project was deleted, the
associated SDK tokens were not removed. This issue has been addressed in
the current version of Unleash.
> 
> Unfortunately, if you deleted a project in the past without manually
removing the associated tokens, these "orphaned" tokens were
automatically converted to “wildcard” tokens, granting access to all
feature flags across all projects.
> 
> Our assessment indicates this poses a minor security concern due to
the following reasons:
> 
> This issue only affects tokens whose entire project scope has been
deleted. 
> 
> Access requires knowledge of the token.
> 
> SDK tokens have limited read access and must be assigned to a single
environment.
> 
> In the SDK tokens overview, orphaned tokens are flagged with a
warning. We recommend discontinuing the use of these tokens and creating
new, dedicated tokens instead.
> 
> With the latest version, when a project is deleted, all API tokens
scoped to that project will be removed as well. If you need further
assistance, please contact customer support.
2024-08-06 14:12:33 +03:00
Mateusz Kwasniewski
c7ececc429
feat: link to frontend api url (#7770) 2024-08-06 13:09:37 +02:00
Thomas Heartman
cd7697db62
feat: new useEventSearch hook (#7757)
Creates a new useEventSearch hook based on the useFeatureSearch hook.
Moves the old useEventSearch hook into useLegacyEventSearch and updates
references to it.

I don't know yet whether this'll work entirely as expected, but I plan
on making any necessary configurations when I implement the state
management in a follow-up PR.

But because this is pretty much a straight copy-paste from
useFeatureSearch (only adjusting types, I think), I also think it might
be possible to turn this into a generic search template. Not sure if now
is the time, but worth thinking about, I think.
2024-08-05 13:12:45 +00:00
Thomas Heartman
dd71fe32bb
Update front end schemas for new event search (#7758)
Updates the orval spec for the new event search.
2024-08-05 12:48:01 +00:00
Mateusz Kwasniewski
ecdae7fee7
feat: playground try configuration mode (#7752) 2024-08-05 12:34:24 +02:00
Thomas Heartman
6dde9082f1
refactor: simplify event log filters component and adds more data (#7736)
This change primarily adds all flags to the flag filter and restructures
the filters component. Instead of splitting into three smaller
components, we now handle more data in the main component.

We might wanna turn them back to smaller components later, but I think
this'll be easier to work with.
2024-08-05 10:07:23 +00:00
Tymoteusz Czech
c37c86f7a0
fix: show api token on playground (#7753)
Fix CR condition preventing API token from showing up
2024-08-05 09:52:49 +00:00
Thomas Heartman
f89b8249f7
fix: decrease collaborator font size (#7754)
Decreases the collaborator font size to make it less eye-catching.

Before:

![image](https://github.com/user-attachments/assets/9a55d7fc-13eb-4656-aead-ca9e25100a63)

After:

![image](https://github.com/user-attachments/assets/3b1e0f26-9fa7-4ae2-ad2c-dc68839c8197)
2024-08-05 09:48:57 +00:00
Tymoteusz Czech
11612931b9
fix: insights health info link placement (#7750)
Fixing link placement on smaller screens.
2024-08-05 10:39:48 +02:00
Thomas Heartman
0284daf2ba
fix: Avoid collaborators being smooshed together (#7741)
Fixes an issue where the collaborator component would be smooshed
together when you have too many collaborators and too many flag tab
items.

The primary things I have done are:
1. Limit the amount of collaborators we show to 6 instead of 8. I
believe the number 8 was arbitrary, so let's go with 6 for now.
2. Instead of using a fixed gap, use a separator element that grows up
to a certain limit. I've added a `Separator` component, which is an
empty div with flex-grow. It feels like you should be able to do that
with gap too, but I can't think of how right now.
3. Don't allow collaborator component text (or avatars) to wrap. We
don't have a lot of space in this header, so let's keep it tight.

Additionally, I've added the `className` prop to the AvatarGroup
component so that it can be styled externally. I also cleaned up some
naming that was left in while I was at it.

Before:

![image](https://github.com/user-attachments/assets/98525a23-c086-433a-8f60-3e281805409f)


After:

![image](https://github.com/user-attachments/assets/559f8975-9cbe-4260-ba5a-409a303375ed)
2024-08-05 10:33:10 +02:00
Tymoteusz Czech
301454838b
fix: strategy edit required param error (#7747)
Fixing error "Missing required path param: featureId", on editing
default project strategy.
2024-08-03 10:03:10 +02:00
Tymoteusz Czech
ebd9c5111e
tests: flexible strategy component stickiness and groupId (#7735)
Follow-up for #7713
2024-08-02 18:52:44 +00:00
Mateusz Kwasniewski
4c55632313
chore: generate orval types (#7742) 2024-08-02 14:55:46 +02:00
Tymoteusz Czech
43c8152515
feat: Change request preview integration (#7743)
Use API to check change request evaluation
2024-08-02 14:35:48 +02:00
Thomas Heartman
993d87516d
fix: show "System" for system users, instead of "User ID n" where n is the project's number in the order. (#7734)
Fixes a bug introduced with the new tooltips where the system user was
shown as "User ID n" instead of "System". The "n" in this case is
actually the user's index number in the list of project owners
(including duplicates).

There's a few things happening: 
1. Change the object for system owners: use `name` instead of
`description`. At the same time, remove the `description` property
completely because it's not used at the moment.
2. Remove the assignnment of `id: objectId(user)` to the user sent to
the User Avatar component. This was a leftover from when we split out
the AvatarGroup component, and is not something we use anymore.

Before:

![image](https://github.com/user-attachments/assets/bd348daf-c81e-4ea9-b8a9-f10af71a0da7)

After:

![image](https://github.com/user-attachments/assets/d147f7c7-d683-43ac-9ee2-6116f155dad6)
2024-08-02 11:29:31 +00:00
Tymoteusz Czech
4b6813aa5e
Playground fields with Change request (#7724)
using `changeRequest` value from URL
2024-08-02 11:01:29 +00:00
Mateusz Kwasniewski
65131727c1
feat: add projects and environments to cr preview (#7740) 2024-08-02 12:56:29 +02:00
Thomas Heartman
ca35ca1b24
chore[demo]: update handling of strategy deletion for demo walkthrough (#7719)
This PR makes some small changes to how we handle strategy deletion in
the demo environment, which has become extra important with the recent
soft limits.

The changes are:
- lower the strategy limit from 30 to 25. The standard limit is 30, so
we want to make sure we're below that.
- when checking whether we should delete a strategy, check whether we're
**at or above** the limit. It used to only check if we were above, but
if soft limits would prevent you from adding more, then you'd never be
able to go above the limit.
- Also delete strategies for step3.
2024-08-02 11:13:42 +02:00
Tymoteusz Czech
a676b1bc20
fix: strategy parameters UI (#7713)
Old versions of Unleash allow for creating "Gradual Rollout" strategies
without `groupId` or `stickiness`. UI will now populate those fields,
not getting stuck when editing strategies without said fields.
2024-08-02 11:11:58 +02:00
Thomas Heartman
2d0fb765f0
fix: align event log filter buttons (#7726)
Fixes an issue where the filter buttons were both too far down and too
far to the right.

The issue was that the wrapper body imposed a pretty substantial bit
of padding. However, the filter buttons already came with their own
bit of padding. The result of this was alignment issues.

To fix it I have:
- opened the `Filters` component up to be styled with styled components

And conditionally (when isEnterprise and the flag is on):
- set the page body to have no padding.
- added a wrapper with padding around the event search results for 

This feels a little messy to me, but I also think that because it's
still in heavy development, it might change later. I'd be happy to have
suggestions forbetter implementations.

What makes this extra tricky is that the top padding differs depending
on whether you have the filters there or not, so I couldn't find a way
to just remove that component and be done with it. I may very well have
missed somehing, though.

Before:

![image](https://github.com/user-attachments/assets/1552d1ec-2c14-450f-9ce8-8e74389f11a1)

After: 

![image](https://github.com/user-attachments/assets/d58b6fe5-437f-4488-bf01-cabfef669e2e)
2024-08-02 11:09:55 +02:00
Thomas Heartman
643cfeb5bb
chore: use EventSchema instead of IEvent (#7732)
Changes the type used by the useEventSearch hook to be `EventSchema`
from OpenAPI instead. This is more accurate with what we're actually
getting. And crucially for the event log search, it contains the
`createdByUserId` property that we need to filter out events.

It's mostly a straightforward find and replace except for one instance
where we need to do some extra fiddling. There's an inline comment
explaining that.
2024-08-02 11:05:42 +02:00
Thomas Heartman
6458d461b9
feat: add event types to filter button (#7733)
Add event types to the event log filter button.

The event types are taken from the OpenAPI definition.
2024-08-02 10:25:25 +02:00
Mateusz Kwasniewski
5cd657065f
feat: copy strategy to current environment (#7730) 2024-08-02 09:46:57 +02:00
Tymoteusz Czech
8aa812e0f5
feat: Orphaned tokens - new API tokens list icon (#7693)
Moving warning icon from "projects" column, to left icon.
2024-08-01 14:31:42 +00:00
Mateusz Kwasniewski
5668bfb7d4
feat: preview changes button (#7722) 2024-08-01 11:59:35 +02:00
Tymoteusz Czech
4aa3a64530
feat: UI for playground of change requests (#7721)
## About the changes
UI draft
2024-08-01 11:16:35 +02:00
Thomas Heartman
f1e95108d1
Wip: split out avatar group; use same tooltip for all avatars (#7681)
Extracts the Avatar Group component into a `common` component and adds a
standard tooltip to all avatars.

Relates to linear issue 1-2606

This is a suggestion / proof of concept for how we can solve it. While I
think we can merge this as is, I'd also be happy to take any discussions
on other ways to approach it etc.

## Why are these changes made together?

Because extracting the avatar group without adding the new tooltip data
made the existing tooltip misbehave (it'd show up in the top left of the
screen, not synced to the avatar in any way).

I probably could have (and still can if you think it's prudent) split it
out such that the avatar gets a standardized tooltip first (and disable
it for the group card avatars), and split out the avatars in a
follow-up. Happy to do that if you think it's better.

## What does this mean? 

It used to be that we had no consistent way of dealing with avatars and
tooltips. Some places had them, some places didn't. This change makes it
so that all avatars that we can show tooltips for will get the same
tooltip.

Previously, we had at least 4 different ways of dealing with tooltips:
- The HTML tooltip (that would be standardized with this PR) in the
project flags table

![image](https://github.com/user-attachments/assets/91098d31-a5e3-4091-9125-332fe5d106fd)
- The "title" that you'd get on your user avatar

![image](https://github.com/user-attachments/assets/39062b61-db8c-4bd5-9fa3-3ecc9bc192ee)
- The group card list tooltip

![image](https://github.com/user-attachments/assets/0d4a696a-e944-446c-8bff-4dcec02d8afb)
- And sometimes you'd get nothing at all

![image](https://github.com/user-attachments/assets/8975afaf-9ca1-4eb6-b443-9ab94b52bbd8)

with this change, we'll always show the same kind of tooltip if we can:


![image](https://github.com/user-attachments/assets/974c592c-c844-4b65-8a55-05e84d3df130)

## What goes in the tooltip? 

We use the `UserAvatar` component for a fair few different things and I
didn't want to extract separate components for all the different use
cases. Instead, I wanted to get an overview over what we use it for and
what is relevant info to show.

I found all the places we used it and tried to form an opinion. 

This tooltip will work with a user's email, name, username, and id. If
there is no user (such as for empty avatars and avatars displaying only
"+n" for remaining members), we show no tooltip.

Following the example set by the group card avatars, we'll try to use
email or username (in that order) as the main bit of text. If the user
has an email or a username and also a name, the name will be used as
secondary text.

If the user does not have an email or username, but has a name, we'll
use the name as the main text.

If the user does not have an email, a username, or a name, we'll try to
show "User ID: N" if they have an id.

If they do not have a username, a name, an email, or an ID, we bail out
and show nothing.

## Why can you disable the tooltip?

In some cases, you might want to disable the tooltip because you have
more information to feed into it. An example of that is in the project
flags table, where we want to show more information in cases where the
user is 'unknown':


![image](https://github.com/user-attachments/assets/758b4e86-e934-47e3-91ce-ce900f76bc54)


## Additional fixes

This PR also adds a few lines of CSS to fix a minor avatar layout bug.

Before:

![image](https://github.com/user-attachments/assets/0150efbf-c51a-40bb-898f-7ddd3565ce21)


After:

![image](https://github.com/user-attachments/assets/f337cf68-c572-4610-b1de-a27749325da8)
2024-08-01 10:45:24 +02:00
Thomas Heartman
7db42453b1
feat: add filter dropdowns to event log pages (#7711)
Adds placeholder filter buttons (that don't work at all) yet to the
three event logs.

Flag logs get to choose to and from dates, created by, and event type.

Project logs get all that flag logs get + a filter for flag.

The global log gets all project log filters + a project filter.

There's still work to be done to add data to createdBy, eventType, to
hook it up to the API, and to finalize the layout, but I wanted to get a
rough outline in to iterate on later. The eventType icon will also need
to be decided on.


![image](https://github.com/user-attachments/assets/06a65301-9cc5-45ed-b753-2b9235d64ea6)
2024-08-01 08:23:22 +02:00
Thomas Heartman
2822746fc1
refactor: Make event log look and act like other pages (#7704)
Updates the way the event log works. Previously, we'd use the
`displayInline` parameter to disable padding and border. However,
recent pages (including project overview etc) have moved away from
this look.

By bringing the event log into line with how those other pages look,
it'll be easier to make designs for the new filtering capability align
with other Unleash filters.

## Changes

The eventlog is used in three places. In two of them, it used to not
have a separating border. However, when we look at other screens that
have seen recent work (such as feature flags), we see that they *do*
have a separator, so bringing the event log in line seems like a
reasonable change.

Project flags list (notice the separator):

![image](https://github.com/user-attachments/assets/9b56a53d-38ef-4492-b1f8-f40ad5f3b6eb)


Here's what they look like before and after the change:

### Global event log
Before: 

![image](https://github.com/user-attachments/assets/ccf428f6-3491-4c60-a853-13c50ae771f0)

After (no change):

![image](https://github.com/user-attachments/assets/cfc74538-285c-4565-bd38-dfb5e421e966)


### Project event log

Before:

![image](https://github.com/user-attachments/assets/80ef1a36-3b13-4e76-8d59-534d63f0e6bd)


After:

![image](https://github.com/user-attachments/assets/7380518c-f6dc-4d4f-b085-48ed3761bb20)


### Flag event log

Before:

![image](https://github.com/user-attachments/assets/345a5d72-d358-49fd-967c-f6cb0706a4f6)


After:

![image](https://github.com/user-attachments/assets/b4e0d8e9-e79c-477e-8fc4-181c366207fc)
2024-07-31 09:46:47 +02:00
Jaanus Sellin
24e2c4030b
feat: new event search flag (#7699)
Add `newEventSearch` flag
2024-07-31 08:59:42 +02:00
Tymoteusz Czech
b585ead6df
fix: avoid react key warnings in tables (#7694)
Refactoring to get rid of `A props object containing a "key" prop is being spread into JSX` warning
2024-07-30 13:09:12 +02:00
Thomas Heartman
08aba91832
fix: flex layout used the wrong axes for layout. (#7696)
This change fixes an issue where the flex layouts for collaborator
info used the wrong axes for layout (row instead of column and vice
versa), causing the component to look wonky.

Before:

![image](https://github.com/user-attachments/assets/695a9f67-ef07-4b3c-936f-69b2f2d62a28)

After:

![image](https://github.com/user-attachments/assets/a0a2c73a-2787-4985-807b-012bb4db94a4)
2024-07-30 09:17:02 +02:00
Thomas Heartman
344e599b09
fix: don't cut off hover-color of favorite button (#7691)
This PR fixes a minor visual issue where the "favorite project" button's
hover outline would get cut off due to its container having `overflow:
hidden`.

The overflow value was introduced in
[#7575](https://github.com/Unleash/unleash/pull/7575) as way to handle
long project names. We didn't discover the hover issue back then because
it's not apparent unless you hover the fav star.

I found the solution in the CSS-tricks post [Preventing a Grid
Blowout](https://css-tricks.com/preventing-a-grid-blowout/). To quote
the article, the reason this works is that:

> the minimum width of a grid column is auto. (The same is true for flex
items, by the way.)
>
> And since auto is entirely based on content, we can say it is
“indefinitely” sized, its dimensions flex. If we were to put an explicit
width on the column, like 50% or 400px, then we would say it is
“definitely” sized.
>
> To apply our fix, we need to make sure that there is the column has a
definite minimum width instead of auto.

Before:

![image](https://github.com/user-attachments/assets/d9296afd-326e-4712-a389-f1bc3a1f821e)


After:

![image](https://github.com/user-attachments/assets/2fd88a51-08be-4bc4-8969-cd6ebbaf255c)

Additionally, I've removed a duplicate declaration of font size,
removing the deprecated version.
2024-07-29 17:03:47 +02:00
Mateusz Kwasniewski
21ab80b753
feat: health stats insights explanation (#7690) 2024-07-29 15:19:20 +02:00
Thomas Heartman
0fe0079053
fix: use nested flexboxes instead of grid area (#7654)
This change removes the use of grid area from the collaborators
component, replacing it with a nested flexbox setup.
2024-07-29 12:55:52 +02:00
Tymoteusz Czech
d825b49f43
fix: health stats number (#7688)
Prevent showing "undefined%" in new Health statistics.
2024-07-29 12:49:03 +02:00
Tymoteusz Czech
5c4bc6f7a0
fix: FeatureForm - not jsx comment (#7689) 2024-07-29 11:32:14 +01:00
Mateusz Kwasniewski
94588c12d4
feat: human readable project names in insight charts (#7686) 2024-07-29 11:52:14 +02:00
Thomas Heartman
1cd1f982ee
fix: allow editors to submit flag form (#7687)
This change is a follow-up to
https://github.com/Unleash/unleash/pull/7685 and fixes another
instance of the same issue.

It wasn't caught previously, because the permissions are passed as
props here, and not used directly.


![image](https://github.com/user-attachments/assets/e8c4cb90-92e3-42ca-9c15-458b5b9d37c2)
2024-07-29 09:45:52 +00:00
Thomas Heartman
80cff0a5fa
fix: allow editors to create flags again (#7685)
This change fixes a bug where editors were suddenly unable to create
flags. The issue is that the new project creation dialog used a
permission button, but didn't supply the project ID.
2024-07-29 09:24:32 +00:00
Thomas Heartman
f24f8a896c
fix: break long project/flag names in the event log to prevent overflow (#7684)
This change sets the `overflow-wrap` property for the definition list
values in the event log. This is to prevent long project/flag names
from making the left-hand side of the card suuuper wide, causing
overflow of the whole container.

Before: 

![image](https://github.com/user-attachments/assets/4f813d71-731d-4bb8-86b0-89ff235b2244)

After:

![image](https://github.com/user-attachments/assets/6739d3f0-552b-47c7-8dca-4235a737367e)
2024-07-29 08:54:43 +00:00
Thomas Heartman
a42970a153
fix: Avoid weird spacing between title and collab mode icon (#7683)
This change fixes an issue where the title of the project would be
pushed all the way to the right when the project was set to "private".

The cause was that the container with the project mode and the title
was a flex box with `justifyContent` set to `space-between`.

Removing that line fixes the issue, and the contents align to the
start of the box. There are no other elements in that container, so it
does not affect anything else.

Before:

![image](https://github.com/user-attachments/assets/e8024e3f-8c68-4ed8-b135-ae49f24664b4)


After:

![image](https://github.com/user-attachments/assets/c5039e59-4ea4-49bb-b391-89864e7520d0)
2024-07-29 08:18:52 +00:00
Thomas Heartman
3a3aaad37d
feat: Use a toggling button for impression data on/off (#7682)
Instead of using a dropdown list for impression data, this PR introduces
a new config button that is a switch type button. It will be filled
(contained) when impression data is on and will be outlined when
impression data is off.

Off:

![image](https://github.com/user-attachments/assets/4710c8aa-a853-43c3-bf3b-86dbbf1a2779)


On:

![image](https://github.com/user-attachments/assets/08316155-83d1-45a2-941f-1c49c254a02b)
2024-07-29 08:05:35 +00:00
Jaanus Sellin
4df8fd3810
feat: redirect to new feature flag creation (#7679)
Currently found only one instance that is using `create-toggle`. So
changed behaviour for that.
2024-07-26 14:27:02 +03:00
Thomas Heartman
9b2c0bf55b
fix: shorten max project name width in feature toggles creation form (#7678)
This change sets the max project name label width to 20ch instead of
30ch.

At 30ch, the button is wide enough that it causes the buttons always
to overflow. At 20, it's about as wide as the impression data button,
and it renders on one line.


Before:

![image](https://github.com/user-attachments/assets/8d28a948-dfa1-4f75-bc8d-473ceb322631)

After:

![image](https://github.com/user-attachments/assets/c73ccc58-13ab-4b33-a82e-275130494c3d)
2024-07-26 12:08:58 +02:00
Thomas Heartman
39cda30dab
chore: update description/docs for the new feature creation dialog fields (#7677)
This PR updates the text used to describe the different fields used in
the new creation dialog.

It also removes a redundant aria attribute (that MUI already handles).
2024-07-26 09:57:22 +00:00
Thomas Heartman
c7bb6c5179
fix: prevent long project names from blowing out the form (#7673)
This change prevents long project names from blowing the form out of
proportion.

To do so, it:
1. sets `whitespace: no-wrap` on the button labels. Judging by the other
styles, this was the intention all along, but it didn't really come up
until now.

2. It also sets the label width for projects to 30ch,so that you'll get
to see quite a bit of the project name before it gets cut off.

It would be possible to set a dynamic width for this button based on the
longest project name, but I'm not sure it adds much value, so I'm
leaning towards keeping it simple.

Here's what the dynamic width would look like:

``` tsx
    const projectButtonLabelWidth = useMemo(() => {
        const longestProjectName = projects.reduce(
            (prev: number, type: { name: string }) =>
                prev >= type.name.length ? prev : type.name.length,
            0,
        );
        return `${Math.min(longestProjectName, 30)}ch`;
    }, [projects]);
```

What it looks like:

![image](https://github.com/user-attachments/assets/51bca3f6-aeb3-4a41-b57e-5ebd9baa3ef6)
2024-07-26 11:39:43 +02:00