1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

1622 Commits

Author SHA1 Message Date
renovate[bot]
470c8d96c1
chore(deps): update dependency prettier to v2.8.1 (#2509)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [prettier](https://prettier.io)
([source](https://togithub.com/prettier/prettier)) | [`2.7.1` ->
`2.8.1`](https://renovatebot.com/diffs/npm/prettier/2.7.1/2.8.1) |
[![age](https://badges.renovateapi.com/packages/npm/prettier/2.8.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/prettier/2.8.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/prettier/2.8.1/compatibility-slim/2.7.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/prettier/2.8.1/confidence-slim/2.7.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>prettier/prettier</summary>

###
[`v2.8.1`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#&#8203;281)

[Compare
Source](https://togithub.com/prettier/prettier/compare/2.8.0...2.8.1)

[diff](https://togithub.com/prettier/prettier/compare/2.8.0...2.8.1)

##### Fix SCSS map in arguments
([#&#8203;9184](https://togithub.com/prettier/prettier/pull/9184) by
[@&#8203;agamkrbit](https://togithub.com/agamkrbit))

<!-- prettier-ignore -->

```scss
// Input
$display-breakpoints: map-deep-merge(
  (
    "print-only": "only print",
    "screen-only": "only screen",
    "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, "sm")-1})",
  ),
  $display-breakpoints
);

// Prettier 2.8.0
$display-breakpoints: map-deep-merge(
  (
    "print-only": "only print",
    "screen-only": "only screen",
    "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, " sm
      ")-1})",
  ),
  $display-breakpoints
);

// Prettier 2.8.1
$display-breakpoints: map-deep-merge(
  (
    "print-only": "only print",
    "screen-only": "only screen",
    "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, "sm")-1})",
  ),
  $display-breakpoints
);
```

##### Support auto accessors syntax
([#&#8203;13919](https://togithub.com/prettier/prettier/pull/13919) by
[@&#8203;sosukesuzuki](https://togithub.com/sosukesuzuki))

Support for [Auto Accessors
Syntax](https://devblogs.microsoft.com/typescript/announcing-typescript-4-9/#auto-accessors-in-classes)
landed in TypeScript 4.9.

(Doesn't work well with `babel-ts` parser)

<!-- prettier-ignore -->

```tsx
class Foo {
  accessor foo: number = 3;
}
```

###
[`v2.8.0`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#&#8203;280)

[Compare
Source](https://togithub.com/prettier/prettier/compare/2.7.1...2.8.0)

[diff](https://togithub.com/prettier/prettier/compare/2.7.1...2.8.0)

🔗 [Release Notes](https://prettier.io/blog/2022/11/23/2.8.0.html)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4zMC4yIiwidXBkYXRlZEluVmVyIjoiMzQuNjIuMSJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gastón Fournier <gaston@getunleash.ai>
2022-12-27 10:45:43 +01:00
Nuno Góis
2d16730cc2
feat: adds an optional dialog and markdown support (#2728)
Adds the option of showing a dialog and adds markdown support to it,
could be useful to show changelogs inside Unleash in the future.


![image](https://user-images.githubusercontent.com/14320932/209147164-ed19c9ab-fae5-452b-9aab-075d058ba10e.png)
2022-12-22 15:47:42 +00:00
Nuno Góis
aaa96f71cb
feat: message banner (#2726)
Related to:
https://linear.app/unleash/issue/2-511/exploration-build-data-for-the-possibility-of-showing-an-alert-to-the
Namely:
https://unleash-internal.slack.com/archives/C046LV85N3C/p1671443897386729

The idea is to have a general message banner that can be controlled
through a feature flag in Unleash to display announcements, warnings,
informations, etc.

Currently using mock feature flags, but the idea is to bind this to a
feature flag we can manage in our Unleash instance, and use its payload
to provide information to end users whenever we want.

Co-authored-by: Gastón Fournier <gaston@getunleash.ai>
2022-12-22 15:16:51 +00:00
sjaanus
e533b44c5b
Adds tracking to maintenance feature (#2723)
Adds tracking with plausible to maintenance feature
2022-12-21 16:16:15 +02:00
sjaanus
be045dc13a
Remove favorites feature flag (#2722) 2022-12-21 12:03:06 +00:00
sjaanus
a0619e963d
Maintenance mode for users (#2716) 2022-12-21 13:23:44 +02:00
Nuno Góis
1ef84da688
fix: set a more generous maxWidth in access timeago cells (#2714)
https://unleash-internal.slack.com/archives/C046LV6HH6W/p1671533789519689
2022-12-20 22:14:29 +01:00
Gastón Fournier
4b519ead4f
perf: Simplify queries to prometheus (#2706)
## About the changes
This PR improves our queries to Prometheus (instead of making multiple queries do only one) and improves the UI and the code. 

The reports aggregate all HTTP methods (GET, POST, PUT, DELETE, OPTIONS, HEAD and PATCH) without distinction under the same "endpoint" (a relative path inside unleash up to a certain depth)

Co-authored-by: Nuno Góis <nuno@getunleash.ai>
2022-12-19 17:06:59 +01:00
Tymoteusz Czech
2c15841af4
fix: metrics one hour select label (#2712) 2022-12-19 16:27:21 +01:00
sjaanus
2d5455d203
Maintenance mode middleware (#2707) 2022-12-19 09:01:04 +02:00
Nuno Góis
d2d5629a36
Feat lazy loading network (#2709)
Adds lazy loading to the network routes, so we end up with smaller
chunks in the build.

Also adds a `start:prod` script that can prove useful to test the chunk
loading behaviour locally.
2022-12-16 18:09:24 +00:00
Nuno Góis
a3ac96f763
Feat network overview (#2708)
https://linear.app/unleash/issue/2-512/exploration-network-overview-represented-as-a-flow-chart

<img width="1307" alt="image"
src="https://user-images.githubusercontent.com/14320932/208110067-294a0b91-d52e-49d1-9024-fa5e8530e2d8.png">
2022-12-16 14:12:36 +00:00
Nuno Góis
1d1219a055
Use new useConditionallyHiddenColumns hook (#2695)
https://linear.app/unleash/issue/2-515/adapt-tables-to-use-the-new-useconditionallyhiddencolumns-hook

Uses the new `useConditionallyHiddenColumns` hook, like mentioned here:
https://github.com/Unleash/unleash/pull/2691
Also includes small fixes for things I caught along the way. See
comments below.
2022-12-16 10:46:04 +01:00
sjaanus
d42e90544f
Maintenance mode UI (#2704) 2022-12-15 16:07:22 +02:00
Mateusz Kwasniewski
f4480d516b
remove change request flag (#2703) 2022-12-15 13:43:06 +01:00
Nuno Góis
90f0d665f9
fix: disable networkView for dev, fail more gracefully (#2701)
Disables networkView for dev for now. Attempts to fail more gracefully
both on the service and front-end.
2022-12-15 10:12:02 +00:00
Mateusz Kwasniewski
2e615cdd35
refresh change request, add conflict margin, set time ago (#2700) 2022-12-15 10:49:16 +01:00
Christopher Kolstad
23094b016e
feat: first draft of chart for instance traffic in frontend (#2670)
## What
We've already added the backend for this. This is the initial work for
drawing a chart for instance traffic in the frontend. It requires the environment variable `PROMETHEUS_API` set to a valid prometheus-query-language (promql) supported backend, such as Prometheus itself or Victoria Metrics. Besides, at the moment we're hiding this functionality behind the flag `UNLEASH_EXPERIMENTAL_NETWORK_VIEW` which has to be set to true

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Gastón Fournier <gaston@getunleash.ai>
2022-12-15 08:47:07 +00:00
Ivar Conradi Østhus
09c87c755f
Fix/remove settings cache (#2694)
In this PR we remove the general SettingService cache, as it will not
work across multiple horizontal unleash instances, events are not
published across.

We also fix the CORS origin to: 
- Access-Control-Allow-Origin set to "*" if no Origin is configured
- Access-Control-Allow-Origin set to "*" if any Origin is configured to
"*"
- - Access-Control-Allow-Origin set to array and have the "cors"
middleware to return an exact match on the user provided Origin.

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-12-14 17:35:22 +01:00
Nuno Góis
db7b39af2d
fix: upgrades useHiddenColumns hook to fix related issues (#2691)
https://linear.app/unleash/issue/2-514/fix-issues-with-conditionally-hidden-table-columns

This upgrades the old `useHiddenColumns` to a new
`useConditionallyHiddenColumns`. This implementation covers some issues
and edge cases, and should hopefully be the standard way of achieving
responsive visibility for table columns from now on.

Some of these issues included incorrectly showing/hiding table columns,
whether when resizing the window or at page load, even when the proper
conditions were met to toggle their visibility.

This PR adapts the tables that were already using `useHiddenColumns` to
use the new approach.
I'll create a new PR after this one to adapt our other existing tables
to use this new approach as well.
2022-12-14 15:22:38 +00:00
Nuno Góis
fe2f2f5705
Update dialogue design (#2342)
https://linear.app/unleash/issue/2-509/update-dialogues-to-match-new-designs

Update dialogues to match the look on the new designs:

![image](https://user-images.githubusercontent.com/14320932/200525669-35525761-1c3e-4c60-94a7-e21b1de99ad7.png)
2022-12-14 15:16:58 +00:00
Mateusz Kwasniewski
a54d53a117
added contraints checking in change request permissions (#2690) 2022-12-14 13:00:51 +01:00
Mateusz Kwasniewski
cb0398ca63
loosen permissions for change requests (#2682) 2022-12-14 10:00:14 +01:00
Nuno Góis
eb433185a1
fix: remove tooltip from favorites cell, some refactoring (#2687)
https://linear.app/unleash/issue/2-510/favorite-cell-tooltips-is-buggy-when-pinned-remove-tooltips

Tooltips were buggy when using the pinned feature, so I aligned with
@NicolaeUnleash and decided to remove them for now:
<img width="407" alt="image"
src="https://user-images.githubusercontent.com/14320932/207380515-476a4bec-c1c0-43af-adb8-f7001ae75e9c.png">

Also includes a slight refactor on this component.
2022-12-14 08:51:41 +00:00
Nuno Góis
212083b5ed
fix: favorite tooltip topleft flash (#2686)
Fixes an issue where the tooltip would flash on the top left when going
through the rows.
2022-12-13 14:06:25 +00:00
Nuno Góis
4afd505164
feat: make favorites a global preference (#2685)
https://linear.app/unleash/issue/2-508/make-pinned-favorites-a-global-preference

Also introduces a `useGlobalLocalStorage` hook where system-wide
preferences that are stored in LocalStorage can be maintained.
2022-12-13 13:20:43 +00:00
Nuno Góis
e05d924663
fix: misc UI/UX fixes, mostly related with favorites (#2683)
https://linear.app/unleash/issue/2-504/misc-frontend-related-fixes-mostly-related-with-favorites
2022-12-13 13:19:21 +00:00
Nuno Góis
a8cd3166d1
fix: adds bottom margin to SSO sync info box (#2674)
https://linear.app/unleash/issue/2-495/group-form-small-ui-fix
2022-12-13 14:01:53 +01:00
sjaanus
419640fb2b
Add unique trackable URLs for Pro/Enterprise feature lead generation (#2684)
Add unique trackable URLs for Pro/Enterprise feature lead generation
2022-12-13 14:35:07 +02:00
sjaanus
fb06fa9f46
Remove full width access tab (#2679)
Remove full width access tab
2022-12-13 13:41:40 +02:00
Mateusz Kwasniewski
086241e583
change request ui tweaks (#2676) 2022-12-13 09:17:17 +01:00
Fredrik Strand Oseberg
cef4181f11
Fix/cr UI fixes (#2675)
This PR contains multiple UI fixes for the change request. It changes
font sizes, icon colors, margins and paddings to be more consistent.
2022-12-12 16:32:38 +01:00
Nuno Góis
5086ec7921
remove feature flag: tokens last seen (#2673)
https://linear.app/unleash/issue/2-470/clean-up-flag
2022-12-12 14:32:35 +00:00
Nuno Góis
e8d0fdba1f
remove feature flag: toggle tag filtering (#2668)
https://linear.app/unleash/issue/2-482/clean-up-feature-flag-after-this-goes-ga

Relevant discussion:
https://unleash-internal.slack.com/archives/C046LV6HH6W/p1670837328201169
2022-12-12 13:21:12 +00:00
Shaswat Prabhat
59c043e1ab
Shaswat: Remove usage of useStyles from UserForm (#2619)
Changes for [issue](https://github.com/Unleash/unleash/issues/2606)

Co-authored-by: Nuno Góis <github@nunogois.com>
2022-12-09 12:10:30 +00:00
Nuno Góis
1bd95d44e5
fix: use instance status too many reqs (#2651)
Same as https://github.com/Unleash/unleash/pull/2650 but for
`useInstanceStatus`, since it followed a similar pattern.
2022-12-09 11:53:31 +01:00
Nuno Góis
bc77342380
fix: too many reqs to feature toggle endpoint (#2650)
Fixes an issue where the feature toggle endpoint gets request too many
times repeatedly.
2022-12-09 10:37:09 +00:00
andreas-unleash
58622bbf99
Fix/change request search (#2647)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fixes bug in Project Change Requests Tab Search
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

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


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

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2022-12-09 11:34:26 +02:00
Mateusz Kwasniewski
a87145b5ef
Fix strategy screen 404 (#2638) 2022-12-09 09:29:44 +01:00
Mateusz Kwasniewski
098755a9b4
Conditional swr (#2637) 2022-12-08 14:59:32 +01:00
andreas-unleash
6bccffef97
Fix/favorites UI improvements (#2636)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Favorite UI improvements
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

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


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

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2022-12-08 14:41:51 +02:00
Mateusz Kwasniewski
2107834768
hide discard for nonauthors (#2634) 2022-12-08 13:24:15 +01:00
Nuno Góis
1be2483e6a
Refactor premium feature (#2627)
https://linear.app/unleash/issue/2-491/improve-premiumfeature-component-and-how-its-implemented


![image](https://user-images.githubusercontent.com/14320932/206237837-6032c3c0-1e42-4be2-8b6f-223e0204e1b5.png)

Refactors `PremiumFeature` to be a bit more straightforward and match
new designs, both in standalone and tooltip modes.
This also fixes the fact that the change requests tab did not display
the premium feature info, along with other smaller fixes.

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2022-12-08 11:42:54 +00:00
Mateusz Kwasniewski
fb2c30244c
adding missing enterprise check (#2635) 2022-12-08 12:37:20 +01:00
Nuno Góis
9b10b26ba4
fix: tags endpoint returning 404 when featureId is not set (#2621)
Leverages the new `useConditionalSWR` hook to fix the underlying issue
in the `useTags` hook, preventing edge cases where we try to fetch when
featureId is not correctly set.
2022-12-08 11:16:53 +00:00
Mateusz Kwasniewski
353f50237d
Change request UI improvements pt2 (#2624) 2022-12-08 10:59:37 +01:00
andreas-unleash
d69ca0a508
ui flags replaced in index.html (#2617)
Signed-off-by: andreas-unleash <andreas@getunleash.ai>

<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
This PR puts the ui flags in the index.html in a meta tag. This makes
them accessible without logging in and allows us to track user signups
with invite links
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

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


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

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2022-12-07 14:31:27 +02:00
Mateusz Kwasniewski
fee95475bd
UI adjustments change requests (#2622) 2022-12-07 12:52:17 +01:00
Nuno Góis
990b708632
fix: isPro check on change request configuration (#2610)
https://linear.app/unleash/issue/2-487/bug-change-request-badge-is-not-working-on-pro
Using the new `isPro()` from `useUiConfig()` seems to fix this in Pro,
correctly showing the premium feature info:


![image](https://user-images.githubusercontent.com/14320932/205958034-f412471a-c732-425a-bb14-64b62ea1e665.png)

The errors described in the issue should be fixed by the new
`useEnterpriseSWR`. See:
https://unleash-internal.slack.com/archives/C046LV6HH6W/p1670337216187539?thread_ts=1670331887.521059&cid=C046LV6HH6W
2022-12-07 10:23:19 +00:00
Nuno Góis
9accbcfa8b
Fix pro project role descriptions (#2612)
https://linear.app/unleash/issue/2-485/bug-pro-access-page-the-tooltip-on-the-roles-is-not-working

Fixes an issue where we would not show anything for project role
permissions since we're not serving that specific endpoint below
Enterprise level. This way we fallback to the access role descriptions,
which are also nice and informative:


![image](https://user-images.githubusercontent.com/14320932/205987327-def46ef2-4010-47dd-ba7d-5a264f0b547d.png)


PR also adds support for SWR options in ConditionalSWR and
EnterpriseSWR.
2022-12-07 10:22:42 +00:00