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

2277 Commits

Author SHA1 Message Date
Nuno Góis
521cc24a22
feat: add more events in integrations (#4815)
https://linear.app/unleash/issue/2-1253/add-support-for-more-events-in-the-slack-app-integration

Adds support for a lot more events in our integrations. Here is how the
full list looks like:

- ADDON_CONFIG_CREATED
- ADDON_CONFIG_DELETED
- ADDON_CONFIG_UPDATED
- API_TOKEN_CREATED
- API_TOKEN_DELETED
- CHANGE_ADDED
- CHANGE_DISCARDED
- CHANGE_EDITED
- CHANGE_REQUEST_APPLIED
- CHANGE_REQUEST_APPROVAL_ADDED
- CHANGE_REQUEST_APPROVED
- CHANGE_REQUEST_CANCELLED
- CHANGE_REQUEST_CREATED
- CHANGE_REQUEST_DISCARDED
- CHANGE_REQUEST_REJECTED
- CHANGE_REQUEST_SENT_TO_REVIEW
- CONTEXT_FIELD_CREATED
- CONTEXT_FIELD_DELETED
- CONTEXT_FIELD_UPDATED
- FEATURE_ARCHIVED
- FEATURE_CREATED
- FEATURE_DELETED
- FEATURE_ENVIRONMENT_DISABLED
- FEATURE_ENVIRONMENT_ENABLED
- FEATURE_ENVIRONMENT_VARIANTS_UPDATED
- FEATURE_METADATA_UPDATED
- FEATURE_POTENTIALLY_STALE_ON
- FEATURE_PROJECT_CHANGE
- FEATURE_REVIVED
- FEATURE_STALE_OFF
- FEATURE_STALE_ON
- FEATURE_STRATEGY_ADD
- FEATURE_STRATEGY_REMOVE
- FEATURE_STRATEGY_UPDATE
- FEATURE_TAGGED
- FEATURE_UNTAGGED
- GROUP_CREATED
- GROUP_DELETED
- GROUP_UPDATED
- PROJECT_CREATED
- PROJECT_DELETED
- SEGMENT_CREATED
- SEGMENT_DELETED
- SEGMENT_UPDATED
- SERVICE_ACCOUNT_CREATED
- SERVICE_ACCOUNT_DELETED
- SERVICE_ACCOUNT_UPDATED
- USER_CREATED
- USER_DELETED
- USER_UPDATED

I added the events that I thought were relevant based on my own
discretion. Know of any event we should add? Let me know and I'll add it
🙂

For now I only added these events to the new Slack App integration, but
we can add them to the other integrations as well since they are now
supported.

The event formatter was refactored and changed quite a bit in order to
make it easier to maintain and add new events in the future. As a
result, events are now posted with different text. Do we consider this a
breaking change? If so, I can keep the old event formatter around,
create a new one and only use it for the new Slack App integration.

I noticed we don't have good 404 behaviors in the UI for things that are
deleted in the meantime, that's why I avoided some links to specific
resources (like feature strategies, integration configurations, etc),
but we could add them later if we improve this.

This PR also tries to add some consistency to the the way we log events.
2023-09-29 16:11:59 +01:00
Mateusz Kwasniewski
fbc571dffc
feat: events for dependencies (#4864) 2023-09-29 14:02:15 +02:00
Mateusz Kwasniewski
011aea226c
feat: edit and delete dependencies menu (#4863) 2023-09-29 10:03:17 +02:00
Nuno Góis
3cf8761364
fix: permissions in the role payload (#4861)
Fixes the role payload to include only the needed properties from
permissions. Fixes `400` (oneOf schema validation error) in project role
creation.
2023-09-28 15:55:46 +01:00
Mateusz Kwasniewski
72cca4f450
feat: display dependencies and parents in project details (#4859) 2023-09-28 13:37:52 +02:00
Fredrik Strand Oseberg
d3e01d84d9
fix: account for array length (#4849)
Small fix to account for array length in conditional check
2023-09-27 15:12:01 +02:00
Tymoteusz Czech
f82ae354eb
fix: project features table initial state (#4843)
When loading don't keep initial state, but recalculate if after proper
data is present. (issue 1-1432)
2023-09-27 08:37:25 +00:00
Mateusz Kwasniewski
6f4f6f049b
feat: inject project id to dependencies hooks (#4839) 2023-09-27 10:09:38 +02:00
Mateusz Kwasniewski
40b9c46018
fix: empty object playground (#4842) 2023-09-27 10:01:03 +02:00
Shreyans Gandhi
e6cdf5a540
feat: add json editor (#4784)
In this PR we are adding a JSON Editor that will be used for `json`
variant payload type. Its using `vanilla-jsoneditor` package
https://www.npmjs.com/package/vanilla-jsoneditor and is lazy loaded only
when the `json` payload type is selected in the dropdown UI.
2023-09-27 09:27:38 +02:00
Mateusz Kwasniewski
889377a246
feat: show available parent dependency options (#4837) 2023-09-27 08:10:15 +02:00
Fredrik Strand Oseberg
6d5eec2810
fix: change check for slider (#4838)
Change the check for when to display the variant preview
2023-09-26 19:12:32 +02:00
Mateusz Kwasniewski
45aca5b09e
feat: Connect add dependency api (#4831) 2023-09-26 11:18:42 +02:00
andreas-unleash
e7b1e7979e
Feat: add prod guard when toggling envs (#4774)
Adds the prod guard dialog when enabling/disabling production
environment

Closes # [1-1386]
(https://linear.app/unleash/issue/1-1386/production-guard-modal-for-enablingdisabling-environment-is-gone)



https://github.com/Unleash/unleash/assets/104830839/0041bfc8-872b-455c-b4fa-e03cc160c3e9

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-09-26 12:16:26 +03:00
Mateusz Kwasniewski
2b9678266c
feat: Add dependency dialogue (#4828) 2023-09-26 09:38:13 +02:00
Mateusz Kwasniewski
a9805b312b
feat: Delete dependency api (#4824) 2023-09-25 15:50:05 +02:00
Jaanus Sellin
2bf995e731
feat: context/segment usage private (#4826) 2023-09-25 15:50:44 +03:00
Nuno Góis
b9946ee35c
docs: Unleash Slack App integration (#4801)
https://linear.app/unleash/issue/2-1235/docs-slack-app-integration-documentation

This adds a new reference doc for the new Unleash Slack App integration
and marks the previous Slack integration as deprecated.

As a side-effect this PR also fixes an issue where we wouldn't be able
to delete tags with special characters.

---------

Co-authored-by: David Leek <david@getunleash.io>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-09-22 23:19:17 +01:00
Fredrik Strand Oseberg
cefbf01934
feat: visualize feature variants on cr (#4809)
Adds a view over feature strategy variants on addStrategy or
editStrategy action
2023-09-22 16:17:41 +02:00
Mateusz Kwasniewski
b4742df8be
feat: UI stub for adding dependent features (#4814) 2023-09-22 11:26:45 +02:00
Fredrik Strand Oseberg
6884f9cdc9
feat: strategy variants on strategy overview (#4776)
Refactors the breakdown of feature variants per strategy on the
environment overview level:
2023-09-21 14:28:45 +02:00
Simon Hornby
b1234fb89c
fix: force permissions export to only be enterprise in ui (#4760) 2023-09-21 11:12:20 +02:00
Tymoteusz Czech
18f7d0f9e1
Remove integrationsRework flag (#4770)
https://linear.app/unleash/issue/1-1359/remove-integrationsrework-flag
2023-09-20 16:27:40 +02:00
Nuno Góis
39b0c089d1
feat: simpler integration filters (#4766)
https://linear.app/unleash/issue/2-1407/remove-the-all-checkboxes-from-project-and-environment-filters

Simplifies integration event filters by removing the "ALL" checkboxes
from these components. Whether you opted to check the "ALL" checkbox, or
not to filter at all, the result is the same - The selected options
would act as a filter.

Includes some refactoring and clean up.


![image](https://github.com/Unleash/unleash/assets/14320932/2e30c5c5-12e1-4bc6-bd4a-8be4226d625d)
2023-09-20 09:21:30 +01:00
Jaanus Sellin
e3ee050e80
chore: remove project select (#4768) 2023-09-20 08:55:30 +03:00
Ivar Conradi Østhus
013efac46b
feat: open-source segments 🚀 (#4690)
We love all open-source Unleash users. in 2022 we built the [segment
capability](https://docs.getunleash.io/reference/segments) (v4.13) as an
enterprise feature, simplify life for our customers.

Now it is time to contribute it to the world 🌏

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2023-09-19 11:24:26 +00:00
David Leek
bff1bd1026
feat: implement optional json payload and template (#4752)
## About the changes

Adds optional support for specifying JSON templates for datadog message
payload


![image](https://github.com/Unleash/unleash/assets/707867/eb7c838a-7abf-441e-972e-ddd7ada07efa)


### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->

`frontend/src/component/integrations/IntegrationForm/IntegrationParameters/IntegrationParameter/IntegrationParameterEnableWithDropdown.tsx`
- a new component comprising of a text field and a dropdown menu
`src/lib/addons/datadog.ts` - Where the integration is taking place

## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

- Should I have implemented the new component type as a specifiable
addon parameter type in definitions? Felt a bit YAGNI/Premature
- Would like input on naming and the new component etc
2023-09-19 13:08:10 +02:00
Mateusz Kwasniewski
4484615321
fix: prevent blur when selecting text (#4762) 2023-09-18 14:42:41 +02:00
andreas-unleash
a50a483d0c
fix: rename Push to Environment button (#4759)
Rename to `Copy to Environment`

Closes #
[1-1388](https://linear.app/unleash/issue/1-1388/update-the-text-for-the-button-push-to-environment-from-variants)

<img width="1423" alt="Screenshot 2023-09-18 at 13 46 57"
src="https://github.com/Unleash/unleash/assets/104830839/c66747e5-a52a-4643-9274-51b72baf9f61">

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-09-18 14:43:13 +03:00
Nuno Góis
055cf15262
fix: misc integration-related fixes and improvements (#4754)
https://linear.app/unleash/issue/2-1401/misc-fixes-and-improvements-related-to-the-new-slack-app-integration

This includes multiple UI-related misc fixes and improvements that are
not only related with the new Slack App integration but also
integrations in general.

 - Improves the styling in the "how does it work" section;
 - Improves the text in the `IntegrationMultiSelector`s;
 - Switches "Configure" and "Open" around to match designs;
- Properly handles click event on `IntegrationCardMenu` (fix navigation
on dialog click);
- Fixes titles and contents for "enable/disable" and "delete"
integration dialogs to match designs;
- Updates Slack App integration "how does it work" section to better
reflect the intended behavior;
 - Removes redundant alerts after previous point;
- Adds an alert in the old Slack integration configuration warning of
its deprecation and suggesting the new Slack App integration instead;
 - Fixes typos;
 - Slight refactors;


![image](https://github.com/Unleash/unleash/assets/14320932/17b09742-f00b-4be2-829f-8248ffe67996)

Co-authored by @nicolaesocaciu
2023-09-15 14:50:59 +01:00
Fredrik Strand Oseberg
387f48617d
fix: round dora metrics (#4755)
* Small change to round numbers in a table
2023-09-15 14:36:35 +02:00
Thomas Heartman
d838b5f2c3
1-1385: hide display of pattern info behind a flag (#4744)
Previously, the front end would show info about the pattern if it
exists, regardless of whether the feature is active or not. The
pattern wouldn't be enforced, but it's confusing anyway, so let's hide
it.
2023-09-15 10:43:56 +00:00
Thomas Heartman
a96110eb36
fix: point to useUiFlag instead of useUiFlags (#4748)
I was a little confused because I couldn't find `useUiFlags` in the
codebase.
2023-09-15 12:31:48 +02:00
Simon Hornby
7843c93dc5
feat: add a button to download user access information (#4746) 2023-09-15 11:51:29 +02:00
andreas-unleash
f9bca20c78
Feat/project private mode (#4743)
Adds `private` option to project mode
Update schemas and models to accept and persist

Closes #
[1-1366](https://linear.app/unleash/issue/1-1366/introduce-private-in-collaboration-mode)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-09-15 11:01:25 +03:00
andreas-unleash
be2fa68a9a
fix: Variant type number duplicate options (#4719)
Fixes a bug where the `number` option was shown multiple times

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-09-14 17:02:05 +03:00
Tymoteusz Czech
257013c56a
fix: integration multiselector (#4683)
Input should use state set outside and derive "all selected" from it.
This was not the case causing issues when loading a form with "wildcard"
pre-selected.
2023-09-14 14:01:40 +02:00
Tymoteusz Czech
e8d5f0cf56
fix: integrations text review (#4706)
## About the changes
Update copy

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-09-14 12:01:29 +00:00
Mateusz Kwasniewski
878780f068
feat: playground custom properties are nested (#4686) 2023-09-14 12:28:28 +02:00
Tymoteusz Czech
66c790fbf1
fix: Integrations quality updates (#4677)
Fix issues uncovered when reviewing integrations list and form.

- YouTube CSP
- Text content and formatting
- Margins
- Update old integration icons
- Fix headers in dark theme
2023-09-14 10:17:33 +02:00
Thomas Heartman
9bdee12ad9
feat: stop regexes with whitespace (#4681)
This PR stops regexes with whitespace from being added as feature naming
patterns.
2023-09-14 07:56:23 +00:00
Thomas Heartman
ab4c1e0193
feat: add feature naming pattern tracking (#4678)
This PR adds plausible metrics for feature naming patterns. The changes
are tracked whenever the form is submitted and the naming pattern has
changed. We track three different actions:
- added :: if there was no pattern before and now there is one
- removed :: if there was a pattern before and now there is none
- changed :: if there was a pattern before and now there is a different
one

The corresponding event type has been created in plausible.
2023-09-14 09:32:15 +02:00
Thomas Heartman
7eb00758e0
refactor: simplify flag naming tooltip (#4685)
This PR simplifies the flag naming tooltip considerably. It now only
contains an example of a pattern and what it will match. It also updates
the link in the form section description to point directly to a regex
cheat sheet instead of a general regex reference document.

There's a few reasons for doing this:
1. The text preceding the input already explains what the pattern does
and explains that it is a regex.
2. The text preceding the input also contains a link to a regex cheat
sheet (which is arguably a better place to explain regexes than a
tooltip).
3. The tooltip was very long. While a lot of the information there was
useful, it would also be hard to use. Imagine a user checking the
tooltip, scrolling all the way down, but accidentally moving the mouse a
bit and the tooltip disappearing. They would have to scroll all the way
down again. Or maybe they need to remember what it was they just looked
at. It would be more useful to have the information on a separate page.
4. The tooltip is not accessible by keyboard. This means that users who
use a keyboard to navigate the UI would not be able to scroll or
otherwise navigate the tooltip, potentially leaving them in the dark.


![image](https://github.com/Unleash/unleash/assets/17786332/88a74ad9-181a-44ba-9eb9-4818c081442f)
2023-09-14 08:09:01 +02:00
Fredrik Strand Oseberg
78273e4ff3
chore: dora cleanup (#4676)
This PR adds: 
* Generated types for useProjectDoraMetrics
* Mobile enhancements
* Tooltips

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-09-13 15:50:42 +02:00
andreas-unleash
8b452084f3
fix: validation for variant payload number type (#4671)
Adds validation to number type for variants

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-09-13 10:23:39 +03:00
Nuno Góis
4de8ea2553
fix: post global events even when filtering by env (#4672)
https://linear.app/unleash/issue/2-1276/deal-with-events-without-an-environment

This makes it so that global events (events not tied to a specific
environment) are always received, no matter the configured environment
filter.

It also includes a respective test and small sentence on the UI
explaining the behavior.


![image](https://github.com/Unleash/unleash/assets/14320932/021a3622-78fe-45af-b68c-dde0813f32f0)
2023-09-13 08:22:18 +01:00
Thomas Heartman
43878230b7
UI: make project settings / creation form full-width (#4675)
This PR makes the project settings / creation forms grow to take up the
full available width, so that it is in line with the new designs.
2023-09-13 06:38:18 +00:00
Thomas Heartman
f49cc8cd33
feat: update UI to add hints about implicit ^ and $ (#4667)
This PR updates the UI to reflect the changes to the implicit ^ and $
that we now add. The changes are:

1. Show input adornments for ^ and $ when you create a pattern.
2. Mention that ^ and $ are added implicitly in description.
3. Checks the example you provide against the pattern with added ^ and $
+ adds a test for that.

Points 1 and 2:

![image](https://github.com/Unleash/unleash/assets/17786332/88c610b4-444b-4a83-a50a-4b7639614a86)


## Discussion point:

I have not touched the information about the pattern yet as the PR that
updates that is still in review (#4656), but it would be prudent to also
update that info to make it clearer. I can address that in a follow-up
PR.
2023-09-13 06:22:55 +00:00
Thomas Heartman
03d6ed0c32
ui: update design for feature naming pattern info (#4656)
This PR updates the design for the feature naming pattern info. In doing
so, I've extracted the information into a single component.

It also, on @nicolaesocaciu's behest, makes the new toggle form inputs
wider when they have room to grow.

Light mode:

![image](https://github.com/Unleash/unleash/assets/17786332/0923cf95-18e3-4524-8402-7f42a0ac94ec)


Dark mode:

![image](https://github.com/Unleash/unleash/assets/17786332/c2a07f73-8973-42d0-b94a-d7dc4ec38a25)

For copying features it looks like this:


![image](https://github.com/Unleash/unleash/assets/17786332/2a39f17b-4d86-408c-8f3b-5f2b24e82c81)
2023-09-13 08:05:58 +02:00
Tymoteusz Czech
ed6547b6f1
fix: integrations UI (#4670)
## About the changes
UI adjustments - text, spacing

Co-authored-by: NicolaeUnleash <103567375+NicolaeUnleash@users.noreply.github.com>
2023-09-12 15:45:51 +03:00