-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: changes policy type dropdown to in-page list #1356
feat: changes policy type dropdown to in-page list #1356
Conversation
✅ Deploy Preview for kuma-gui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few odd things here.
- The actual implementation looks very different from the figma (missing top card with short desc and link to docs), Side selection shouldn't have borders, title should be just policies.
- We seem to be requesting the list of policies and the stats on each change of policy. This seems unnecessary
- For new policies we mentioned showing the
kind
of the top level targetRef to make it more useful (the current type column is useless as it's already selected on the left). - Not found show errors (I don't know if it's a mock issue) but it should show the empty state.
This PR’s focus was to implement the change from the policy type dropdown to a sidebar.
Where do I get the descriptions from?
We can’t currently avoid using cards around content like that. The designs assume that the background color of the page is a plain white, but that’s not always the case. On grey background, the content of the policy type list, for example, would look really bad (barely legible grey text on grey background). That’s why I asked for the designs to be done on a grey background so this would be taken into account automatically.
I’ve changed that.
I can try and think of a way to avoid this. Both currently and in this PR, selecting a policy type is a navigation to the policy list view with the appropriate parameter representing the policy type. That will always trigger the
I have a branch prepared that implements this which is waiting for kumahq/kuma#7485 to be implemented. We need this so we know when to show the column.
Yeah, that’s a mock issue. We haven’t mocked out the data for all policy types (especially newer types) and so landing on such a view shows (correctly) the error state because with the mock data, the request does actually result in a 404. With the real API, this wouldn’t happen unless the policy type actually doesn’t exist. |
Changes the policy type dropdown to an in-page list. Splits out the presentational part of the policy list view into its own PolicyList component. Signed-off-by: Philipp Rudloff <[email protected]>
Signed-off-by: Philipp Rudloff <[email protected]>
For the description let's start with a generic text:
Make sure there's a i18n entry so we can easily change it in the future. Opening a PR for kumahq/kuma#7485 in a sec |
Signed-off-by: Philipp Rudloff <[email protected]>
Adds a new "Target ref" column to the policy list view. Removes "Type" column. Signed-off-by: Philipp Rudloff <[email protected]>
Signed-off-by: Philipp Rudloff <[email protected]>
Signed-off-by: Philipp Rudloff <[email protected]>
|
Signed-off-by: Philipp Rudloff <[email protected]>
If the top-level target ref has a name and its kind is |
Signed-off-by: Philipp Rudloff <[email protected]>
Signed-off-by: Philipp Rudloff <[email protected]>
Signed-off-by: Philipp Rudloff <[email protected]>
Signed-off-by: Philipp Rudloff <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the few comments pointed out
Signed-off-by: Philipp Rudloff <[email protected]>
Signed-off-by: Philipp Rudloff <[email protected]>
Signed-off-by: Philipp Rudloff <[email protected]>
Changes
Changes the policy type dropdown to an in-page list.
Splits out the presentational part of the policy list view into its own PolicyList component.
Resolves #1144.
Signed-off-by: Philipp Rudloff [email protected]
Screenshots
Before:
After: