-
Notifications
You must be signed in to change notification settings - Fork 4.7k
chore: Transitions for IDE #35714
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
chore: Transitions for IDE #35714
Changes from 20 commits
5d6c310
84662bd
be2b59c
e05c222
7c12d18
1866d2f
5a60120
cc95473
1ebac75
9664239
6dc8f62
226160b
55c40b4
2c82b26
b0019a9
acfae93
590ffad
156296e
8fc4c7c
bff4536
9080f5c
44244a0
75866ef
a912f5c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export const IDE_HEADER_HEIGHT = 40; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| import { easings } from "@react-spring/web"; | ||
| import type { AnimatedGridUnit } from "./types"; | ||
|
|
||
| /** Default rows config. */ | ||
| export const DEFAULT_ROWS: AnimatedGridUnit[] = ["1fr"]; | ||
|
|
||
| export const SPRING_ANIMATION_CONFIG = { | ||
| easing: easings.easeInCirc, | ||
| duration: 375, | ||
| friction: 32, | ||
| mass: 1, | ||
| tension: 205, | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export const BOTTOM_BAR_HEIGHT = 37; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 37 seems like an odd number to use (some pun intended). Are we not following some sort of multiple of 2 or 4 rule? |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ import styled from "styled-components"; | |
| import { Classes } from "@blueprintjs/core"; | ||
| import { getTypographyByKey } from "@appsmith/ads-old"; | ||
| import { Icon } from "@appsmith/ads"; | ||
| import { IDE_HEADER_HEIGHT } from "IDE"; | ||
|
|
||
| export const Container = styled.div` | ||
| display: flex; | ||
|
|
@@ -10,7 +11,7 @@ export const Container = styled.div` | |
| background-color: var(--ads-v2-color-bg-subtle); | ||
| } | ||
| & .${Classes.EDITABLE_TEXT} { | ||
| height: ${(props) => props.theme.smallHeaderHeight} !important; | ||
| height: ${IDE_HEADER_HEIGHT} !important; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nit] It seems that |
||
| display: block; | ||
| cursor: pointer; | ||
| } | ||
|
|
@@ -21,9 +22,9 @@ export const Container = styled.div` | |
| &&&& .${Classes.EDITABLE_TEXT_CONTENT}, &&&& .${Classes.EDITABLE_TEXT_INPUT} { | ||
| display: block; | ||
| ${getTypographyByKey("h5")}; | ||
| line-height: ${(props) => props.theme.smallHeaderHeight} !important; | ||
| line-height: ${IDE_HEADER_HEIGHT} !important; | ||
| padding: 0 ${(props) => props.theme.spaces[2]}px; | ||
| height: ${(props) => props.theme.smallHeaderHeight} !important; | ||
| height: ${IDE_HEADER_HEIGHT} !important; | ||
| } | ||
| &&&& .${Classes.EDITABLE_TEXT_INPUT} { | ||
| margin-right: 20px; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
I've a few points to make here:
Duration based animation cancels out physics based animation, so friction/mass/tension are not used in this case and should probably be deleted because it can be quite confusing. So, we should configure using either physics or duration, not both.
[nit] I know we're just experimenting here, but in case we use duration based animations, usage of react-spring doesn't make much sense, we'd be better of using native CSS animations.
[nit] It is subjective, but to me even 375 seems a bit slow, I would speed it up to 250ms.