-
Notifications
You must be signed in to change notification settings - Fork 12
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
Simplify css and DropzoneBetweenElements #3158
Simplify css and DropzoneBetweenElements #3158
Conversation
|
||
const Line = styled("div")` | ||
background-color: ${({ theme }) => theme.col.blueGrayDark}; | ||
margin: 1px 0; |
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.
No need for margin
or flex-grow
, instead just setting width: 100%
height: number; | ||
} | ||
|
||
const Root = styled("div")` |
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.
No need for a root wrapper
@@ -5,52 +5,41 @@ import Dropzone, { | |||
PossibleDroppableObject, | |||
} from "../../ui-components/Dropzone"; | |||
|
|||
interface Props { |
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.
Co-locate props with where they're used below
position: absolute; | ||
top: 0; | ||
left: 0; | ||
transform: translateY(calc(-50% - ${LINE_HEIGHT / 2}px)); |
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.
No need to allow passing height or top, we can simply set height to 30px, that makes the droppable area always 30px high. Then we can use transform
to move the dropzone "between" the elements by -50%
related to its own height of 30px, minus half the height of the line. That makes it sit right in the middle
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 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.
Yeah good point, fixed it with a classname and making the last dropzone less high
Hey @fabian-bizfactory , I thought this was quicker than doing another round of review |
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.
Those changes would prevent the overlap.
frontend/src/js/external-forms/form-components/DropzoneBetweenElements.tsx
Show resolved
Hide resolved
frontend/src/js/external-forms/form-components/DropzoneBetweenElements.tsx
Show resolved
Hide resolved
frontend/src/js/external-forms/form-components/DropzoneBetweenElements.tsx
Show resolved
Hide resolved
frontend/src/js/external-forms/form-components/DropzoneBetweenElements.tsx
Show resolved
Hide resolved
028a378
into
feature/allow-insertion-of-concepts-between-each-other
No description provided.