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

3658 Commits

Author SHA1 Message Date
Jaanus Sellin
5f67dcefcd
feat: archive is now part of project feature list (#8587)
![image](https://github.com/user-attachments/assets/6218a1f7-1ef7-49f8-85d0-c6ee1c34d954)
2024-10-30 10:38:42 +02:00
Jaanus Sellin
28e062b5cf
feat: archived features can be searched now (#8568)
Archived features can be searched now.
This is the backend and small parts of frontend preparing to add
filters, buttons etc in next PR.

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-10-29 13:19:13 +02:00
Mateusz Kwasniewski
e666f90e1e
feat: playground result count buckets (#8555) 2024-10-28 15:43:07 +01:00
Jaanus Sellin
eaab9db60d
fix: now feature table does not dissapear (#8554)
Feature table does not dissapear when onboarding and filter settings
hides all features
2024-10-28 15:39:20 +02:00
Thomas Heartman
622998c62e
fix: invalid spreading of keys into table rows everywhere (#8551)
This commit fixes invalid prop spreading warnings in all the table rows
I could find through a quick search in the code base.

The issue is that you can't spread the "key" prop into a component. It
*must* be an explicit prop.

The process is the same everywhere:
1. Instead of spreading `row.getRowProps()` into the component, we
extract and split it: `const {key, ...rowProps} = row.getRowProps()`.
2. Do the same thing for cellProps.
2024-10-28 13:47:22 +01:00
Mateusz Kwasniewski
a8d608792d
feat: track personal dashboard seen (#8539) 2024-10-25 09:29:14 +02:00
sjaanus
ff6ca920ce
feat: start tracking project tab navigation 2024-10-25 09:16:52 +03:00
gitar-bot[bot]
589d9f1af7
[Gitar] Cleaning up stale flag: displayTrafficDataUsage with value true (#8481) 2024-10-24 08:05:06 +02:00
Nuno Góis
ababe9fe75
chore: Unleash AI UX adjustments: placement, icon, color (#8521)
https://linear.app/unleash/issue/2-2870/ux-adjustments-following-the-breakathon-placement-on-demo-bot-icon-and

Post-breakathon UX adjustments, including:
- Properly positions the Unleash AI chat option to the left of the demo
steps, when the demo steps are visible.
- Replaces the bot icon with a friendlier, more upbeat version.
- Switches the chat purple color in the light theme to `primary.main`
for better accessibility.

Additionally, I’ve added the mode property to our themes for easier
future maintenance. This makes it simple to check the currently active
theme.


![image](https://github.com/user-attachments/assets/bc0c2f99-5460-4bc7-8aa0-e8d94156b669)
2024-10-23 15:59:02 +01:00
Mateusz Kwasniewski
b7b5a8ae48
fix: stretch strategies underlying root cause (#8520) 2024-10-23 16:24:15 +02:00
Mateusz Kwasniewski
74a87f0e26
fix: stretch strategies (#8519) 2024-10-23 14:15:07 +02:00
Melinda Fekete
8b0af59897
Update and restructure environments (#8496) 2024-10-22 17:55:11 +02:00
Tymoteusz Czech
f4abf5308a
test(navigation): snapshot sidebar for different plans (#8507)
Test navigation element by snapshot for all plans
2024-10-22 09:13:59 +00:00
Mateusz Kwasniewski
cbfdb8ca6e
refactor: Composable new in unleash (#8505) 2024-10-22 10:52:08 +02:00
Mateusz Kwasniewski
d3294d58c2
chore: remove navigation sidebar leftover flag (#8504) 2024-10-22 10:08:27 +02:00
Nuno Góis
c170580064
chore: add Plausible events to Unleash AI chat (#8494)
https://linear.app/unleash/issue/2-2856/add-plausible-tracking-in-unleash-ai-open-close-chat-send-message

Adds Plausible tracking to some Unleash AI chat events:
 - Open chat
 - Close chat
 - Send message
2024-10-21 14:58:13 +01:00
Mateusz Kwasniewski
69fcb572ef
fix: break words first, break all second (#8495) 2024-10-21 15:10:20 +02:00
Thomas Heartman
a8206f5118
fix: handle loading states for project details for a single project (#8492)
This PR updates the use of references on the project details page to
handle the loading state for a single project.

Now, if a project is loading, it'll show skeleton loaders for the
relevant boxes:


![image](https://github.com/user-attachments/assets/a156cc88-e4bf-421a-8afe-2b46e26d5544)

I've also updated the state type we use for this to be more accurate. Shamelessly
stolen from Elm.

```ts
type RemoteData<T> = 
  | { state: 'error', error: Error } 
  | { state: 'loading' } 
  | { state: 'success', data: T } 
```

After refactoring: 

![image](https://github.com/user-attachments/assets/03d655de-1ab8-4289-9f0c-d158ede8e116)
2024-10-21 14:27:43 +02:00
Mateusz Kwasniewski
9fecc02462
feat: personal dashboard scrollbars and spacing (#8493) 2024-10-21 13:14:51 +02:00
Nuno Góis
0f3e7ec7e3
chore: Unleash AI chat UX bug fixes (#8488)
https://linear.app/unleash/issue/2-2859/small-ux-bug-fixes-on-the-unleash-ai-chat

Bug fixes:

- Up and down arrow keys not functioning in multiline input
- Multiline input expanding beyond the intended size limit
- Chat window failing to properly scroll to the bottom when opened
2024-10-21 08:38:28 +01:00
Nuno Góis
5b1e875131
chore: add an initial disclaimer to Unleash AI (#8482)
https://linear.app/unleash/issue/2-2853/add-a-disclaimer-to-the-unleash-ai-chat-window

Adds a small, initial disclaimer to Unleash AI chat.


![image](https://github.com/user-attachments/assets/0097bb92-9724-4cef-922e-4c97770fe8e1)
2024-10-18 14:48:49 +01:00
Nuno Góis
ffcfe85575
chore: scroll-related UX adjustments in the Unleash AI chat (#8478)
https://linear.app/unleash/issue/2-2857/make-some-scroll-related-ux-adjustments-to-the-unleash-ai-chat

Introduces scroll-related UX enhancements to the Unleash AI chat,
providing a smoother and more refined user experience.
2024-10-18 14:38:46 +01:00
Mateusz Kwasniewski
9b3529d7cb
fix: missing page titles (#8477) 2024-10-18 13:12:58 +02:00
Thomas Heartman
88f396f6b6
fix: allow you to add spaces to role descriptions (#8475)
This fixes a bug where we didn't allow spaces in role descriptions.
The bug came about because we wanted to disallow empty descriptions,
but that means we need to trim them before validating, not necessarily
before setting it.

However, that does mean that you can have descriptions with leading
and trailing spaces now, but that's probably fine.

To fix this, we'd have to do the trimming of the description only at
submission time, I think.
2024-10-18 11:07:06 +02:00
Thomas Heartman
9f0c438f36
fix: add the dashboard icon to the iconrenderer (#8474)
This makes the icon show up correctly in the command menu.


![image](https://github.com/user-attachments/assets/0178c9a7-3509-4f36-9a33-fe12e5a42707)
2024-10-18 09:03:29 +02:00
David Leek
d9646edcfc
feat: release plans nav menu item and icon suggestion (#8469) 2024-10-18 08:23:52 +02:00
Thomas Heartman
bb22210e46
chore: silence remaining front end test warnings (#8465)
This silences front end test warnings, errors, and logs that we don't
care about. The
reason we don't care is that:
- we won't fix
- it's test-specific, doesn't appear to happen in real life

And it clogs the test logs.
2024-10-17 14:02:47 +02:00
Simon Hornby
d5ddbdd75f
chore: patch text when trying to add a root role group (#8470)
This changes the warning on adding group root roles to cover all roles
rather than just Editor or Admin. This got opened to Viewers in a 2K
line monster PR that was mostly refactor so I'm assuming this was an
accident but it's not a dangerous accident

## Discussion

Okay so why change the warning rather than change the code?

Two reasons.
1) This has been like this for a year and a half. It was changed before
the feature entered GA, so users are probably used to it by now. Seems
rude to take things away and it's harmless to keep it
2) It's consistent with everything else to have all 3 roles displayed
and removes an edge case in the code
2024-10-17 12:00:44 +02:00
Nuno Góis
f2256423d5
chore: adapt UI to server-side Unleash AI chat ownership (#8466)
https://linear.app/unleash/issue/2-2847/adapt-unleash-ai-chat-logic-to-new-server-side-chat-ownership-logic

Adapts the Unleash AI chat logic on the UI to the new server-side chat
ownership logic.
2024-10-17 09:50:27 +01:00
Tymoteusz Czech
793221524c
feat: prompt for feedback after second flag created (#8467) 2024-10-17 11:49:17 +03:00
Ivar Conradi Østhus
2ec575b85c
fix: traffic estimate should Math.floor price estimate to full million (#8468)
<!-- 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! ❤️ -->

## 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? -->
2024-10-17 09:45:45 +02:00
Thomas Heartman
131e608885
fix: fix two disabled tooltips (#8464)
Fix this warning:

> MUI: You are providing a disabled button child to the Tooltip
component.
> A disabled element does not fire events.
> Tooltip needs to listen to the child element’s events to display the
title.
> Add a simple wrapper element, such as a span.
2024-10-16 15:25:50 +02:00
Thomas Heartman
cb0a26941b
fix: wrap the UserAvatar component in forwardRef (#8461)
This fixes another one of the warnings we have in our tests and is
probably a sane change to make anyway.
2024-10-16 14:58:34 +02:00
Thomas Heartman
fe09ae214f
chore: fix "key" prop issues in front end tests (#8459)
Fixes all warnings about the "key" prop. The majority of the fixes fall
into one of the following categories:

- Extracting "key" props in tables (you're not allowed to just spread
them in)
- Adding "key" props to autocomplete options and chips
- fixing test data that didn't contain ids
2024-10-16 14:57:43 +02:00
Melinda Fekete
c580e762b3
Restructure features documentation (#8394) 2024-10-16 13:59:30 +02:00
Nuno Góis
9a98f86077
chore: make the Unleash AI chat resizable (#8456)
https://linear.app/unleash/issue/2-2840/make-the-unleash-ai-chat-window-resizable

This PR makes the Unleash AI chat resizable, providing users with a
flexible way to adjust the chat window's size.

Implements a reusable `Resizable` wrapper component that allows
configuration of:
 - Minimum, maximum, and default sizes.
- Customizable resize handlers for each edge and corner of the
container.
 - Optional resize event callbacks.

Double-clicking any resize handler maximizes the container along that
axis (or both, if it's a corner). If the container is already maximized,
double-clicking again will revert it to the default size.
2024-10-16 09:15:40 +01:00
Thomas Heartman
6ba87d1436
chore: fix invalid dom nesting (#8451)
This PR fixes all `invalidDomNesting` errors we're getting in our tests.
The culprit was the `Badge` icon we use, which wrapped its children in a
div. When that's used as a child of a `p` tag, that'd cause this to
trigger.

What I've done is to change the wrapping element to a span instead. The
Badge itself uses an `display: inline-flex`, so divs and spans should be
treated the same, meaning there's no visual change for this.
2024-10-16 08:33:47 +02:00
Nuno Góis
8d4e84d6eb
fix: unleash AI chat message code not breaking to new line (#8455)
https://linear.app/unleash/issue/2-2841/fix-a-bug-where-code-does-not-break-to-new-lines-in-messages

Fixes a bug where code in an Unleash AI chat message would not break to
new lines.

### Before

<img width="451" alt="image"
src="https://github.com/user-attachments/assets/43023206-f6e9-48ef-bd22-cc0c0fe04668">

### After

<img width="404" alt="image"
src="https://github.com/user-attachments/assets/2f0bad32-8d40-4edd-bdbb-df0eb9ffb977">
2024-10-15 14:43:01 +00:00
Thomas Heartman
6b56f8ff89
chore: add descriptions to accordion headers (#8452)
This commits adds descriptions to the accordion headers in the
personal dashboard.


![image](https://github.com/user-attachments/assets/d7b7aeff-3a69-45f7-ab42-23228a49132b)
2024-10-15 13:14:18 +00:00
Thomas Heartman
abef5deaef
chore: remove all deprecated imports of act (#8398)
don't use `act` from `react-dom`. Instead, use act from `react`
directly, as advised by the deprecation notice.

This PR fixes all of the deprecated import warnings, updates some
testing libraries we use (and tests), and fixes one or two other
warnings.
2024-10-15 13:53:26 +02:00
Mateusz Kwasniewski
fc1f058cf4
chore: make onboarding concepts img more readable (#8448) 2024-10-15 12:02:55 +02:00
Tymoteusz Czech
258eb36afe
fix($env): fix environment order form state (#8449) 2024-10-15 09:44:40 +00:00
Thomas Heartman
e4cfb29adc
refactor: front end code pt II (#8444)
This PR continues the refactoring of the front end code for dashboards. 

The main points are:
- Extracts the `ActionBox` component that we used in a lot of places.
There were some minor differences between the various incarnations, so
this also better aligns them.
- Extract other components (`AskOwnerToAddYouToTheirProject`,
`YourAdmins`)
- Move the `NeutralCircleContainer` into `SharedComponents`
- Delete the separate no content grid (this is now handled in projects
instead)
- extract my projects grid contents into a single function so that it's
easier to understand what content you get for what states

Here's all the states side by side:

![image](https://github.com/user-attachments/assets/c5abc406-7374-41e4-8ff6-d48fe61cd7c8)
2024-10-15 09:14:24 +00:00
Tymoteusz Czech
f5a2a18ffc
Add environment types environment order (#8447) 2024-10-15 11:00:31 +02:00
Thomas Heartman
4167d772e9
chore: rename personal dashboard menu item to dashboard (#8437)
This change updates the title for the personal dashboard menu item to
be just "dashboard"

Before:

![image](https://github.com/user-attachments/assets/d04be63c-ad1f-471b-8ab1-5e781063716c)

After:

![image](https://github.com/user-attachments/assets/dc4a39b6-5b30-455d-b20a-6f04f84962d7)
2024-10-15 09:34:43 +02:00
Nuno Góis
d02443be95
chore: Unleash AI chat UI (#8445)
https://linear.app/unleash/issue/2-2792/create-the-aichat-component

Implements the Unleash AI chat UI.

This is essentially a polished version from the hackathon.

It will show up in the bottom right corner when the respective
prerequisites are met.

<img width="1508" alt="image"
src="https://github.com/user-attachments/assets/80da15a5-e638-4ccf-850b-508fcfd4991a">

<img width="1507" alt="image"
src="https://github.com/user-attachments/assets/8690cd42-1106-4f42-b459-41e574ab282f">

<img width="1506" alt="image"
src="https://github.com/user-attachments/assets/ea243828-ffcd-4243-b40c-6fa6357c3e70">
2024-10-15 08:14:04 +01:00
Nuno Góis
f63496d47f
chore: Unleash AI API hook (#8441)
https://linear.app/unleash/issue/2-2791/create-a-useaiapi-react-hook

Implements a basic Unleash AI API React hook that fits our initial needs
for interacting with this API through our frontend.

Also adds a new nice-to-have script to run the frontend set to the
`demo` base path, which matches our Cloud defaults. This way you can run
the latest local cloud with the latest local frontend in an easy way.
2024-10-14 13:29:29 +01:00
Thomas Heartman
9d49070cee
refactor: refactor personal dashboard front end code pt1 (#8440)
This is the first step in refactoring the front end code for personal
dashboards.

At this point:
- extract `useDashboardState` to its own file
- extract my flags to its own file
- Rename `Grid.tsx` to `SharedComponents.tsx` as it contains more than
just the grid.
2024-10-14 13:51:23 +02:00
Thomas Heartman
a3dd51734e
fix: handle cases where the flag name causes API errors (or other errors occur) (#8439)
This commit fixes a bug where the frontend would crash if the flag
name was invalid (such as `..`).


![image](https://github.com/user-attachments/assets/6f41f0d3-4d5f-433d-ad53-899d22b02d89)
2024-10-14 11:48:22 +02:00
Thomas Heartman
5a036997dc
Revert "Refactor front end code pt 1 (#8438)"
This reverts commit 8c2ed5dc30.
2024-10-14 11:46:09 +02:00