Skip to content

Commit

Permalink
sticky title in kanban (#7172)
Browse files Browse the repository at this point in the history
* sticky title in kanban

* optimize header

* optimize ui

* update z-index

* feat: optimize code

---------

Co-authored-by: zhouwenxuan <[email protected]>
Co-authored-by: 杨国璇 <[email protected]>
  • Loading branch information
3 people authored Dec 14, 2024
1 parent 919cd2e commit 9219b49
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
8 changes: 8 additions & 0 deletions frontend/src/metadata/views/kanban/add-board/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.sf-metadata-kanban-add-board-wrapper {
position: sticky;
top: 16px;
margin-left: 8px;
padding-right: 16px;
height: fit-content;
}

.sf-metadata-view-kanban .sf-metadata-kanban-add-board-button {
min-width: 300px;
height: 2rem;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/metadata/views/kanban/add-board/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ const AddBoard = ({ groupByColumn }) => {
}, [isShowPopover]);

return (
<>
<div className="sf-metadata-kanban-add-board-wrapper">
<div id={id} className="sf-metadata-kanban-add-board-button" onClick={handleButtonClick} title={gettext('New category')}>
<Icon iconName="add-table" />
<span className="sf-metadata-kanban-add-board-title">{gettext('New category')}</span>
</div>
{isShowPopover && (
<AddCategoryPopover target={id} options={options} onCancel={onToggle} onSubmit={handleAddNewOption} />
)}
</>
</div>
);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
.sf-metadata-view-kanban-board-header {
height: 32px;
top: 0;
position: sticky;
height: 48px;
width: 100%;
overflow: visible;
display: flex;
align-items: center;
padding: 16px 8px 0 8px;
margin-bottom: 8px;
background-color: white;
z-index: 1;
}

.sf-metadata-view-kanban-board-header .sf-metadata-view-kanban-board-header-title {
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/metadata/views/kanban/boards/board/index.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.sf-metadata-view-kanban-board {
width: 278px;
flex-shrink: 0;
margin-right: 16px;
}

.sf-metadata-view-kanban-board:first-child {
margin-left: 8px;
}

.sf-metadata-view-kanban-board .smooth-dnd-container.vertical {
height: calc(100% - 32px);
margin: 0 8px;
}

.sf-metadata-view-kanban-board .smooth-dnd-container.vertical .smooth-dnd-draggable-wrapper:last-child .sf-metadata-kanban-card {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/metadata/views/kanban/boards/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
.sf-metadata-view-kanban-boards .smooth-dnd-container.horizontal {
white-space: nowrap;
display: flex;
padding: 16px;
}

.sf-metadata-view-kanban-boards .smooth-dnd-container {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/metadata/views/kanban/index.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.sf-metadata-view-kanban {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
Expand Down

0 comments on commit 9219b49

Please sign in to comment.