Skip to content

Commit

Permalink
Merge pull request #79 from supertokens/fix/78-ui-fixes
Browse files Browse the repository at this point in the history
fix: Fix UI disparities with the designs
  • Loading branch information
rishabhpoddar authored Mar 8, 2023
2 parents 47e2b92 + f61d919 commit 4a88cf4
Show file tree
Hide file tree
Showing 26 changed files with 117 additions and 28 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.4.4] - 2023-03-08

- General aesthetic fixes for the dashboard UI

## [0.4.3] - 2023-03-06

- Fixes an issue where entering an incorrect API key would refresh the page
Expand Down
3 changes: 2 additions & 1 deletion build/asset-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@
"static/media/people-opened.svg": "/static/media/people-opened.svg",
"static/media/left-arrow-dark.svg": "/static/media/left-arrow-dark.svg",
"static/media/help-icon.png": "/static/media/help-icon.png",
"static/media/chevron-down.svg": "/static/media/chevron-down.svg",
"static/media/chevron-up-selected.svg": "/static/media/chevron-up-selected.svg",
"static/media/people.svg": "/static/media/people.svg",
"static/media/chevron-left.svg": "/static/media/chevron-left.svg",
"static/media/provider-facebook.svg": "/static/media/provider-facebook.svg",
"static/media/chevron-right.svg": "/static/media/chevron-right.svg",
"static/media/chevron-down.svg": "/static/media/chevron-down.svg",
"static/media/triangle-down.svg": "/static/media/triangle-down.svg",
"main.css.map": "/static/css/main.css.map",
"bundle.js.map": "/static/js/bundle.js.map",
Expand Down
4 changes: 2 additions & 2 deletions build/static/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/css/main.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/static/media/chevron-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/static/media/chevron-up-selected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashboard",
"version": "0.4.3",
"version": "0.4.4",
"private": true,
"dependencies": {
"@babel/core": "^7.16.0",
Expand Down
4 changes: 2 additions & 2 deletions src/assets/chevron-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/chevron-up-selected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import "./assets/checkmark.svg";
import "./assets/chevron-down.svg";
import "./assets/chevron-left.svg";
import "./assets/chevron-right.svg";
import "./assets/chevron-up-selected.svg";
import "./assets/close.svg";
import "./assets/copy.svg";
import "./assets/delete.svg";
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/copyText/CopyText.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
padding-right: 4px;
}
.copy-text-action {
cursor: pointer;
border-radius: 50%;
transition: 0.3s;
&:hover {
Expand Down
5 changes: 5 additions & 0 deletions src/ui/components/inputField/InputField.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
border-radius: 6px;
border: none;
outline: none;
background-color: rgb(250, 250, 250);
}

.input-field:focus {
background-color: white;
}

.input-field-inset-focused,
Expand Down
5 changes: 4 additions & 1 deletion src/ui/components/userDetail/userDetail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ $container-width: 829;
display: inline-flex;
overflow: hidden;
max-width: 290px;
font-size: 13px;
font-size: 14px;
font-family: "Source Code Pro";
font-weight: 500;
}
}
&__action {
Expand Down Expand Up @@ -133,6 +135,7 @@ $container-width: 829;
overflow: visible;
}
&__guide {
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
Expand Down
1 change: 0 additions & 1 deletion src/ui/components/userDetail/userDetailHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export const UserDetailHeader: React.FC<UserDetailHeaderProps> = ({
<div className="user-detail__header__action">
<button
className="button button-error"
style={{ fontWeight: "normal" }}
onClick={openDeleteConfirmation}>
Delete
</button>
Expand Down
5 changes: 5 additions & 0 deletions src/ui/components/userDetail/userDetailSessionList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ $container-width: 829;
.button-error-outline {
display: block;
}

&.session-id {
font-family: "Source Code Pro";
font-weight: 500;
}
}

td:last-child {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/userDetail/userDetailSessionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const UserDetailsSessionListItem: React.FC<UserDetailsSessionListItemProps> = ({

return (
<tr className="session-row with-data">
<td className="w30">
<td className="w30 session-id">
<span>{_sessionhandle}</span>
</td>
<td>{createdDate}</td>
Expand Down
7 changes: 7 additions & 0 deletions src/ui/components/usersListTable/UserRowMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ export const UserRowMenu: FC<UserRowMenuProps> = ({ user, menuItems }) => {
<img
src={getImageUrl("chevron-down.svg")}
alt="Open user detail"
className="img-normal"
/>

<img
src={getImageUrl("chevron-up-selected.svg")}
alt="Open user detail"
className="img-hover"
/>
</button>
<div className="user-row-select-popup">
Expand Down
29 changes: 25 additions & 4 deletions src/ui/components/usersListTable/UsersListTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ $container-padding-v: 24px;
}

.user-row-select-button {
background-color: white;
display: inline-flex;
align-items: center;
justify-content: center;
Expand All @@ -120,11 +121,17 @@ $container-padding-v: 24px;
transition: 0.3s;
img {
width: 12px;
transition: 0.3s;
transition: transform 0.3s;
}

.img-hover {
display: none;
}
}

.user-row-select-menu {
cursor: pointer;

.user-row-select-popup {
display: none;
z-index: var(--z-index-inline-popup);
Expand All @@ -143,10 +150,11 @@ $container-padding-v: 24px;
display: inline-flex;
align-items: center;
height: 28px;
padding: 4px 8px;
padding: 8px;
font-weight: normal;
width: 100%;
transition: 0.3s;
border-radius: 4px;

span {
white-space: nowrap;
Expand All @@ -160,14 +168,22 @@ $container-padding-v: 24px;
display: none;
}

&.delete {
color: var(--color-button-error-border);
}

&:hover {
background-color: var(--color-copy-box-bg);
background-color: var(--color-popup-item-hover);
.img-hover {
display: initial;
}
.img-normal {
display: none;
}

&.delete {
background-color: var(--color-popup-item-delete-hover);
}
}
}

Expand All @@ -176,10 +192,15 @@ $container-padding-v: 24px;
display: block;
}
.user-row-select-button {
border: 1px solid var(--color-primary);
box-shadow: 0px 0px 5px var(--color-primary);
img {
display: none;
}

.img-hover {
display: initial;
transform: rotateZ(180deg);
box-shadow: 0px 0px 3px var(--color-shadow);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/usersListTable/UsersListTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ const UserTableRow: React.FC<
text: "Delete user",
imageUrl: "trash.svg",
hoverImageUrl: "trash-opened.svg",
className: "delete",
});

return menuItems;
Expand Down
3 changes: 2 additions & 1 deletion src/ui/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500&display=swap");

body {
font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
Expand All @@ -24,7 +25,7 @@ body {
}

code {
font-family: Menlo, source-code-pro, Monaco, Consolas, "Courier New", monospace;
font-family: Menlo, "Source Code Pro", Monaco, Consolas, "Courier New", monospace;
}

* {
Expand Down
38 changes: 33 additions & 5 deletions src/ui/styles/uikit.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

/* classes for layout panel */
.panel {
padding: 0px 34px;
padding: 0px 40px;
background-color: var(--color-white);
border-radius: 6px;
border-radius: 12px;
box-shadow: 0 0 6px var(--color-shadow);
display: block;
max-width: 100%;
Expand Down Expand Up @@ -52,6 +52,7 @@
}
&__body {
padding: 24px 0px;
padding-bottom: 18px;
}
}

Expand Down Expand Up @@ -249,6 +250,15 @@ button.button-error {
@include gap-horizontal(8px);
border: none;
font-size: inherit;
transition: background-color 0.3s;

&:disabled {
background-color: var(--color-button-error-disabled);
}

&:hover {
background-color: var(--color-button-error-hover);
}
}

.button.button-error-outline,
Expand All @@ -263,6 +273,15 @@ button.button-error-outline {
@include gap-horizontal(8px);
font-size: inherit;
box-shadow: none;
transition: background-color 0.3s;

&:disabled {
border-color: var(--color-button-error-disabled);
}

&:hover {
background-color: var(--color-button-outline-hover);
}
}

.button.outline,
Expand All @@ -271,10 +290,11 @@ button.outline {
box-shadow: none;
color: var(--color-secondary-text);
border-color: var(--color-secondary-text);
transition: background-color 0.3s;
font-weight: 500 !important;
&:hover {
background-color: var(--color-secondary-text);
background-color: var(--color-button-outline-hover);
box-shadow: inherit;
color: var(--color-white);
}
}

Expand All @@ -285,7 +305,15 @@ button.link,
&:not(.flat) {
border-color: var(--color-link);
&:hover {
background-color: var(--color-link);
background-color: var(--color-button-outline-hover);
}
}
}

.footer {
a {
&:hover {
background-color: transparent;
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion src/ui/styles/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ body {

/* Background Colors */
--color-loader-placeholder-bg: rgba(110, 106, 101, 0.4);
--color-shadow: rgba(158, 37, 38, 0.16);
--color-shadow: rgba(0, 0, 0, 0.16);
--color-container-shadow: rgba(0, 0, 0, 0.16);
--color-error-shadow: rgba(158, 37, 38, 0.16);
--color-error-bg: rgb(253, 240, 241);
Expand Down Expand Up @@ -79,10 +79,16 @@ body {
/* Button color */
--color-button-error: rgb(237, 52, 78);
--color-button-error-border: rgb(222, 35, 61);
--color-button-error-disabled: rgb(221, 221, 221);
--color-button-error-hover: rgb(222, 35, 61);

/* Z-index value for different of popup element */
--z-index-inline-popup: 1;
--z-index-modal-popup: 10;

--color-popup-item-hover: rgb(240, 240, 240);
--color-popup-item-delete-hover: rgba(222, 35, 61, 0.12);
--color-button-outline-hover: rgb(250, 250, 250);
}

*[data-theme="dark"] {
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
* under the License.
*/

export const package_version = "0.4.3";
export const package_version = "0.4.4";

0 comments on commit 4a88cf4

Please sign in to comment.