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

12356 Commits

Author SHA1 Message Date
Mateusz Kwasniewski
15144e4e93
docs: feature lifecycle availability (#8288) 2024-09-27 12:28:50 +02:00
Mateusz Kwasniewski
829fda77fd
refactor: composition root for personal dashboard service (#8280) 2024-09-27 10:44:27 +02:00
Thomas Heartman
6655b2d961
feat: create page for when you have no projects (#8285)
This adds a front end fallback screen for when you have no projects.


![image](https://github.com/user-attachments/assets/1e6e0a63-968a-43cf-84ee-9a67d9f0ca91)
2024-09-27 10:41:25 +02:00
Jaanus Sellin
b73c283e6c
feat: now code examples are joined into one (#8284)
Joined all examples into one copyable example.

Did not do following ones, because they are using templates and probably
will not work as joined.

1. React
2. Svelte
3. Vue

Also skipped, because those examples are not final yet.

1. .NET
2. Android



![image](https://github.com/user-attachments/assets/c8dabed4-21d0-4af9-900f-e77c5d069fe1)
2024-09-27 10:28:12 +03:00
Alvin Bryan
d1c3e3fa2c
Matching <title> and h1 for "11 principles" post (#8206) 2024-09-26 16:47:25 +01:00
Mateusz Kwasniewski
4107e84f43
feat: personal dashboard project details API stub (#8282) 2024-09-26 15:51:51 +02:00
Nuno Góis
d161fb49ee
chore: implement event grouping in the event timeline (#8254)
https://linear.app/unleash/issue/2-2663/implement-event-grouping-when-multiple-events-happen-in-a-short-period

This PR introduces a grouping logic for timeline events, enhancing the
way events are displayed when they occur close to each other.

We also updated and refactored components to support handling groups of
events rather than individual events.

Also includes some minor code cleanups and optimizations as part of
general refactoring efforts (scouting).


![image](https://github.com/user-attachments/assets/eed74ddd-017c-430d-b919-3cb7e257052d)

---------

Co-authored-by: David Leek <david@getunleash.io>
2024-09-26 14:48:52 +01:00
Jaanus Sellin
86e7bbc85d
feat: after onboarding show success box with resources (#8278)
![image](https://github.com/user-attachments/assets/7e60ad54-c750-4e8a-8556-a1735a99a43e)
2024-09-26 15:40:14 +03:00
Christopher Kolstad
547e41e566
docs: recommend PG v13 or later (#8276)
Unify on PG v13, we had one place recommending v10, release notes for v6
saying we dropped support for v10 through v12 and mentioning 13, and a
place mentioning 14 or newer.

fixes: #8265

---------

Co-authored-by: Melinda Fekete <melinda.fekete@getunleash.io>
2024-09-26 14:38:00 +02:00
Mateusz Kwasniewski
409e0e74ba
feat: read projects from personal dashboard API (#8279) 2024-09-26 14:17:47 +02:00
Tymoteusz Czech
2292e2f6ca
feat(onboarding): Vue and Svelte snippets (#8250) 2024-09-26 15:06:30 +03:00
Thomas Heartman
e20ef56374
fix: trim name and description before validation (#8275)
This fixes a bug where you can input just whitespace for
name/description. It also means that you can no longer have both "my
role" and "my role    " as separate roles.

API fix will follow.
2024-09-26 11:54:16 +00:00
Nuno Góis
eb01b44e69
test: skip vercel toolbar in e2e tests (#8273)
Some e2e Cypress tests were failing due to the Vercel live feedback
toolbar covering interactive elements, preventing test actions from
completing:
https://github.com/Unleash/unleash/actions/runs/11048512034/job/30692949711#step:4:136

This PR addresses the issue by disabling the Vercel toolbar specifically
during Cypress tests. This is done by setting the
`x-vercel-skip-toolbar` header, which Vercel provides to prevent the
toolbar from interfering with automated tests. You can find more
information about this feature in the Vercel documentation: [Disable
Toolbar for
Automation](https://vercel.com/docs/workflow-collaboration/vercel-toolbar/managing-toolbar#disable-toolbar-for-automation).

Specific type declarations were needed due to
https://github.com/cypress-io/cypress/issues/19564
2024-09-26 12:53:31 +01:00
Thomas Heartman
5a874df915
fix: trim role names before validation (#8277)
This trims role names before validation and subsequent validation.
This fixes a bug where you could have names that were empty or that
were duplicates of other names, but with leading or trailing
spaces. (They display the same in the UI).

This does not modify how we handle descriptions in the API. While the
UI form requires you to enter a description, the API does not. As
such, we can't make that required now without it being a breaking
change.
2024-09-26 11:52:51 +00:00
Mateusz Kwasniewski
137b8ee260
feat: project details for personal dashboard (#8274) 2024-09-26 13:43:51 +02:00
Thomas Heartman
d6f5280a98
feat: show user's roles and project owners (#8253)
This change shows the user's roles and project owners in the personal
dashboard.
2024-09-26 10:47:29 +00:00
Jaanus Sellin
4397af0df7
chore: move onboarding flow and dialog under same location (#8272)
It is mostly moving the onboarding folders under same directory for more
clear project structure.
2024-09-26 12:56:49 +03:00
Thomas Heartman
a7e0743d88
chore: remove manual anonymization of outgoing project owners (#8252)
This change removes the flag used to anonymize project owners on the
way out. It was an issue in demo when we'd forgotten to configure the
email encryption. However, this issue has been resolved and we can
remove this check now.
2024-09-26 11:29:18 +02:00
Mateusz Kwasniewski
ceb21fbe51
feat: get projects by ids (#8269) 2024-09-26 11:27:59 +02:00
Mateusz Kwasniewski
33f44072dc
docs: demo is pro (#8270) 2024-09-26 11:24:41 +02:00
Thomas Heartman
cf476f9e7d
chore: update orval for personal dashboards (#8268)
Updates orval for personal dashboards
2024-09-26 11:03:55 +02:00
Nuno Góis
3f80fdb090
fix: layout content width on large screens (#8267)
I believe the changes in https://github.com/Unleash/unleash/pull/8234,
more specifically [this
change](https://github.com/Unleash/unleash/pull/8234/files#diff-3a5e0763fe1effa9cd485763fecf0633ce8f0877c9d1971e6bd5c5abe7426364L64),
have caused the main layout content to no longer stretch to its maximum
relative width on larger screens.

This adjustment seems to resolve this issue, ensuring proper behavior on
larger screens without introducing any overflow issues on smaller
screens.
2024-09-26 09:51:15 +01:00
Jaanus Sellin
d0499dbf94
feat: sdk connected using production snippet (#8266)
1. Fix nodejs snippet
2. Tie the snippet to the completed stage.
3. Pull out the code renderer, to shared component


![image](https://github.com/user-attachments/assets/886c9502-4407-4aa7-8b63-84035f8cdb8a)
2024-09-26 11:39:05 +03:00
Mateusz Kwasniewski
823f6330b7
refactor: move getProjectsByUser to read model (#8262) 2024-09-26 09:45:02 +02:00
Jaanus Sellin
aca0de414e
feat: display new completed dialog (#8255)
1. Now the dialog will not close when SDK got connected
2. It will start to show the suggested production code. ( this will be
attached in next PR)
3. Also, it has connected indicator on the right
4. Back button is removed in this stage.


![image](https://github.com/user-attachments/assets/c7290e0f-8fa7-4382-a91d-7206e32d81ae)

---------

Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2024-09-26 09:24:15 +03:00
Tymoteusz Czech
c7427f4b91
feat(onboarding): nodejs snippet for production (#8256) 2024-09-25 15:45:53 +02:00
Thomas Heartman
44bf6615a3
feat: add project owners to personal dashboard project payload (#8248)
This PR adds project owner information to the personal dashboard's
project payload.

To do so, it uses the existing project owners read model.

I've had to make a few changes to the project owners read model to
accomodate this:
- make the input type to `addOwners` more lenient. We only need the
project ids, so we can make that the only required property
- fall back to using email as the name if the user has no name or
username (such as if you sign up with the demo auth)
2024-09-25 11:32:33 +00:00
Mateusz Kwasniewski
e680921517
test: reduce noise from test warnings (#8251) 2024-09-25 12:56:09 +02:00
Tymoteusz Czech
cdb1297246
feat(onboarding): Rust SDK snippet (#8239)
A bit different then other examples - only way to run current state of
Rust SDK is to have some kind of an opinionated setup around it.
2024-09-25 12:33:58 +02:00
Nuno Góis
a95c8d183f
chore: event timeline persistent state (#8240)
https://linear.app/unleash/issue/2-2700/persist-timeline-state-in-local-storage

Implements persistent state management for the event timeline using
local storage.

I believe this improves UX by persisting both the timeline toggle
(visibility) state and applied filters across page refreshes.

Includes some scouting/refactoring and some workarounds to prevent the
timeline from animating on page load (in most cases).
2024-09-25 11:20:27 +01:00
Mateusz Kwasniewski
a1a24ea0b1
feat: flag exposure in personal dashboard (#8247) 2024-09-25 11:11:30 +02:00
Thomas Heartman
289324fd02
feat: add group project roles to project roles (#8245)
This PR adds project roles you get from groups to the list of roles
listed for each project.
2024-09-25 10:29:05 +02:00
Mateusz Kwasniewski
957ef12ca3
fix: adjust welcome dialog size (#8244) 2024-09-25 09:11:53 +02:00
Mateusz Kwasniewski
e33f71a8f4
feat: highlighting flags chart (#8237) 2024-09-25 08:36:30 +02:00
Thomas Heartman
4fe80ffc3f
feat: add your projects (with roles) to personal dashboard api (#8236)
This PR adds some of the necessary project data to the personal
dashboard API: project names and ids, and the roles that the user has in
each of these projects.

I have not added project owners yet, as that would increase the
complexity a bit and I'd rather focus on that in a separate PR.

I have also not added projects you are part of through a group, though I
have added a placeholder test for that. I will address this in a
follow-up.
2024-09-25 06:17:25 +00:00
renovate[bot]
f92f2d9327
chore(deps): update dependency @types/react to v18.3.7 (#8242)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/react](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react))
| [`18.3.6` ->
`18.3.7`](https://renovatebot.com/diffs/npm/@types%2freact/18.3.6/18.3.7)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.3.6/18.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.3.6/18.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am
every weekday" in timezone Europe/Madrid, 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 these
updates again.

---

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

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-24 22:08:55 +00:00
renovate[bot]
792a728f7b
chore(deps): update dependency @types/nodemailer to v6.4.16 (#8241)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/nodemailer](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/nodemailer))
| [`6.4.15` ->
`6.4.16`](https://renovatebot.com/diffs/npm/@types%2fnodemailer/6.4.15/6.4.16)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnodemailer/6.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnodemailer/6.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnodemailer/6.4.15/6.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnodemailer/6.4.15/6.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am
every weekday" in timezone Europe/Madrid, 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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-24 19:33:30 +00:00
Tymoteusz Czech
bfe3af6dc2
fix: SDK snippets import (#8235) 2024-09-24 15:35:00 +02:00
Nuno Góis
5063e151ed
chore: event timeline header placement (#8234)
https://linear.app/unleash/issue/2-2662/make-the-event-timeline-available-globally-through-a-new-header-button


https://github.com/user-attachments/assets/bde38ee8-cdd8-409d-a95e-0c06189e3d9b

(In the video, you’ll notice a slight delay before new events show up.
This happens because the timeline automatically refreshes every 10
seconds)

Removes the event timeline from the event log and integrates it into a
new header option.

I chose a middle-ground approach between options 1 and 2 from our Figma
sketches. This solution provides the best of both worlds IMO: the
timeline stands out as a global component, distinct from the current
page context, while sliding in rather than overlapping the content. This
way, users can view the timeline alongside the page content.
2024-09-24 13:43:30 +01:00
Mateusz Kwasniewski
54432f3f31
feat: personal flag metrics display (#8232) 2024-09-24 13:47:21 +02:00
Tymoteusz Czech
d6dbdab6f1
feat(onboarding): sdk snippets in files (#8233)
Makes it easier to edit code snippets. Additionally, adds lazy loading
to reduce bundle size.
2024-09-24 13:37:32 +02:00
Jaanus Sellin
7e13e74a3e
feat: only show sdk button to specific roles (#8231)
This aligns it with our expectations we agreed on discovery meeting.
2024-09-24 12:43:22 +03:00
Gastón Fournier
5ac32b3713
chore: send full message without trimming to the addon event (#8230)
Address
https://github.com/Unleash/unleash/pull/8219#discussion_r1772884465
2024-09-24 10:43:08 +01:00
Nuno Góis
72bdce98de
chore: feature event formatter md format style (#8222)
https://linear.app/unleash/issue/2-2697/implement-proper-markdown-bold-format-in-feature-event-formatter-md

This is a follow up to https://github.com/Unleash/unleash/pull/8205,
specifically [this
comment](https://github.com/Unleash/unleash/pull/8205#issuecomment-2368207656)
from @gastonfournier

Implements an easy way to switch between formatting styles in our event
formatter. This enhancement will allow us to generate fully
markdown-formatted event summaries when needed, while preserving the
simplistic markdown formatting currently supported by platforms like
Slack.

Also includes some slight scouting. See comments for details.
2024-09-24 10:25:12 +01:00
Gastón Fournier
7d916e9449
fix: trim messages longer than 3000 chars (#8219)
## About the changes
When trying to send messages longer than 3000 chars we get this error:
```
[ERROR]  web-api:WebClient:0 failed to match all allowed schemas [json-pointer:/blocks/0/text]
[ERROR]  web-api:WebClient:0 must be less than 3001 characters [json-pointer:/blocks/0/text/text]
[2024-09-23T10:10:15.676] [WARN] addon/slack-app - All (1) Slack client calls failed with the following errors: A platform error occurred: {"ok":false,"error":"invalid_blocks","errors":["failed to match all allowed schemas [json-pointer:/blocks/0/text]","must be less than 3001 characters [json-pointer:/blocks/0/text/text]"],"response_metadata":{"messages":["[ERROR] failed to match all allowed schemas [json-pointer:/blocks/0/text]","[ERROR] must be less than 3001 characters [json-pointer:/blocks/0/text/text]"],"scopes":["incoming-webhook","users:read","channels:read","groups:read","mpim:read","im:read","users:read.email","chat:write"],"acceptedScopes":["chat:write"]}}
```

This PR trims the text length to 3000 chars.

We also upgrade slack API due to some security fixes:
https://github.com/slackapi/node-slack-sdk/releases/tag/%40slack%2Fweb-api%407.3.4

After checking the migration guide to v7 it seems that none of the
breaking changes affect us:
https://github.com/slackapi/node-slack-sdk/wiki/Migration-Guide-for-web%E2%80%90api-v7

## Testing
I did manual test this integration and the fix. The way to reproduce is
adding a very long strategy name and sending that as an update on Slack:

![image](https://github.com/user-attachments/assets/81df9554-f59b-4fa4-96c8-77dbf7a56257)

Now the event succeeds and we notice on the integration event log that
the message was trimmed:

![image](https://github.com/user-attachments/assets/79efc536-3dd3-4090-99f3-5fd4c7a88715)

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2024-09-24 10:06:10 +02:00
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
renovate[bot]
4e8d9a2319
chore(deps): update dependency msw to v2.4.8 (#8225)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [msw](https://mswjs.io)
([source](https://redirect.github.com/mswjs/msw)) | [`2.4.7` ->
`2.4.8`](https://renovatebot.com/diffs/npm/msw/2.4.7/2.4.8) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/msw/2.4.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/msw/2.4.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/msw/2.4.7/2.4.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/msw/2.4.7/2.4.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mswjs/msw (msw)</summary>

###
[`v2.4.8`](https://redirect.github.com/mswjs/msw/releases/tag/v2.4.8)

[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.4.7...v2.4.8)

#### v2.4.8 (2024-09-17)

##### Bug Fixes

- address `express` and `path-to-regexp` vulnerabilities
([#&#8203;2285](https://redirect.github.com/mswjs/msw/issues/2285))
([`e3487bc`](e3487bc425))
[@&#8203;markmssd](https://redirect.github.com/markmssd)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am
every weekday" in timezone Europe/Madrid, 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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-24 02:02:52 +00:00