Skip to content
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

Feature/adjust board component scroll #447

Merged
merged 12 commits into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ require (
github.com/tidwall/gjson v1.7.3 // indirect
go.uber.org/zap v1.16.0
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sys v0.0.0-20210324051608-47abb6519492 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)
2 changes: 2 additions & 0 deletions server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,7 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr
golang.org/x/oauth2 v0.0.0-20190319182350-c85d3e98c914/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -1359,6 +1360,7 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
Expand Down
2 changes: 1 addition & 1 deletion webapp/cypress/integration/createBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Create and delete board / card', () => {

it('Can set the board title', () => {
// Board title
cy.get('.ViewTitle>.Editable.title').
cy.get('.Editable.title').
type(boardTitle).
type('{enter}').
should('have.value', boardTitle);
Expand Down
3 changes: 0 additions & 3 deletions webapp/src/components/cardDetail/cardDetail.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
.CardDetail {
.title {
width: 100%;
}

.add-buttons {
display: flex;
Expand Down
40 changes: 40 additions & 0 deletions webapp/src/components/centerPanel.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,48 @@
.CenterPanel {
flex: 1 1 auto;
display: flex;
flex-direction: column;

.octo-board {
flex: 0 1 auto;

display: flex;
flex-direction: column;
}
}


.BoardComponent {
flex: 1 1 auto;
display: flex;
flex-direction: column;
overflow: auto;

> * {

padding: 0 80px;

@media screen and (max-width: 768px) {
padding: 0 40px;
}

&:first-child {
padding-top: 24px;
@media screen and (max-width: 768px) {
padding: 0 8px;
}
}

&:last-child {
padding-bottom: 8px;
}
}

> .top-head {
position: sticky;
top: 0;
left: 0;
background: rgb(var(--main-bg));
z-index: 100;
}
}
85 changes: 43 additions & 42 deletions webapp/src/components/centerPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class CenterPanel extends React.Component<Props, State> {

return (
<div
className='BoardComponent octo-app'
className='BoardComponent'
ref={this.backgroundRef}
onClick={(e) => {
this.backgroundClicked(e)
Expand All @@ -129,54 +129,55 @@ class CenterPanel extends React.Component<Props, State> {
/>
</RootPortal>}

<div className='octo-frame'>
<div className='top-head'>
<TopBar/>
<ViewTitle
key={board.id + board.title}
board={board}
readonly={this.props.readonly}
/>

<div className={activeView.viewType === 'board' ? 'octo-board' : 'octo-table'}>
<ViewHeader
boardTree={boardTree}
showView={showView}
setSearchText={this.props.setSearchText}
addCard={() => this.addCard('', true)}
addCardFromTemplate={this.addCardFromTemplate}
addCardTemplate={this.addCardTemplate}
editCardTemplate={this.editCardTemplate}
readonly={this.props.readonly}
/>
{activeView.viewType === 'board' &&
<Kanban
boardTree={boardTree}
selectedCardIds={this.state.selectedCardIds}
readonly={this.props.readonly}
onCardClicked={this.cardClicked}
addCard={this.addCard}
/>}
{activeView.viewType === 'table' &&
<Table
boardTree={boardTree}
selectedCardIds={this.state.selectedCardIds}
readonly={this.props.readonly}
cardIdToFocusOnRender={this.state.cardIdToFocusOnRender}
showCard={this.showCard}
addCard={(show) => this.addCard('', show)}
onCardClicked={this.cardClicked}
intl={this.props.intl}
/>}
{activeView.viewType === 'gallery' &&
<Gallery
boardTree={boardTree}
readonly={this.props.readonly}
onCardClicked={this.cardClicked}
selectedCardIds={this.state.selectedCardIds}
addCard={(show) => this.addCard('', show)}
/>}
</div>
<ViewHeader
boardTree={boardTree}
showView={showView}
setSearchText={this.props.setSearchText}
addCard={() => this.addCard('', true)}
addCardFromTemplate={this.addCardFromTemplate}
addCardTemplate={this.addCardTemplate}
editCardTemplate={this.editCardTemplate}
readonly={this.props.readonly}
/>
</div>

{activeView.viewType === 'board' &&
<Kanban
boardTree={boardTree}
selectedCardIds={this.state.selectedCardIds}
readonly={this.props.readonly}
onCardClicked={this.cardClicked}
addCard={this.addCard}
/>}

{activeView.viewType === 'table' &&
<Table
boardTree={boardTree}
selectedCardIds={this.state.selectedCardIds}
readonly={this.props.readonly}
cardIdToFocusOnRender={this.state.cardIdToFocusOnRender}
showCard={this.showCard}
addCard={(show) => this.addCard('', show)}
onCardClicked={this.cardClicked}
intl={this.props.intl}
/>}

{activeView.viewType === 'gallery' &&
<Gallery
boardTree={boardTree}
readonly={this.props.readonly}
onCardClicked={this.cardClicked}
selectedCardIds={this.state.selectedCardIds}
addCard={(show) => this.addCard('', show)}
/>}

</div>
)
}
Expand Down
7 changes: 6 additions & 1 deletion webapp/src/components/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
left: 0;
right: 0;
bottom: 0;
z-index: 10;
z-index: 200;
}

.wrapper {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(var(--body-color), 0.5);
}

Expand Down
38 changes: 20 additions & 18 deletions webapp/src/components/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,30 @@ const Dialog = React.memo((props: Props) => {
}
}}
>
<div className='dialog' >
<div className='toolbar'>
{toolsMenu &&
<>
<IconButton
onClick={props.onClose}
icon={<CloseIcon/>}
title={closeDialogText}
className='IconButton--large'
/>
<div className='octo-spacer'/>
<MenuWrapper>
<div className='wrapper' >
<div className='dialog' >
<div className='toolbar'>
{toolsMenu &&
<>
<IconButton
onClick={props.onClose}
icon={<CloseIcon/>}
title={closeDialogText}
className='IconButton--large'
icon={<OptionsIcon/>}
/>
{toolsMenu}
</MenuWrapper>
</>
}
<div className='octo-spacer'/>
<MenuWrapper>
<IconButton
className='IconButton--large'
icon={<OptionsIcon/>}
/>
{toolsMenu}
</MenuWrapper>
</>
}
</div>
{props.children}
</div>
{props.children}
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/gallery/galleryCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
position: absolute;
right: 10px;
top: 10px;
z-index: 3000;
z-index: 30;
.IconButton {
background-color: rgba(var(--body-color), 0.13);
}
Expand Down
6 changes: 5 additions & 1 deletion webapp/src/components/kanban/kanban.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
flex-direction: row;

min-height: 30px;
margin-bottom: 16px;
padding-bottom: 16px;
color: #909090;
position: fixed;
z-index: 1;
background: rgb(var(--main-bg));
}

.octo-board-header-cell {
Expand Down Expand Up @@ -55,6 +58,7 @@
display: flex;
flex-direction: row;
flex: 0 1 auto;
margin-top: 50px;
}

.octo-board-column {
Expand Down
6 changes: 5 additions & 1 deletion webapp/src/components/table/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
}

.octo-table-header {
position: fixed;
z-index: 1;
background: rgb(var(--main-bg));

.octo-table-cell {
color: rgba(var(--body-color), 0.6);

Expand All @@ -112,7 +116,7 @@
}
}

.MenuWrapper {
.MenuWrapper {
width: 100%;
max-width: calc(100% - 5px);

Expand Down
6 changes: 5 additions & 1 deletion webapp/src/components/table/tableRow.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
color: rgba(var(--body-color), 0.64);
background-color: rgba(var(--body-color), 0.1);
box-shadow: rgba(var(--body-color), 0.1) 0px 0px 0px 1px,
rgba(var(--body-color), 0.1) 0px 2px 4px;
rgba(var(--body-color), 0.1) 0px 2px 4px;
height: 90%;
width: 100%;
}
Expand All @@ -27,4 +27,8 @@
display: block;
}
}

&:nth-child(2) {
margin-top: 48px;
}
}
19 changes: 12 additions & 7 deletions webapp/src/components/viewTitle.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
.ViewTitle {
flex: 0 0 auto;
display: flex;
flex-direction: row;
align-items: center;
min-width: 300px;
> div {
flex: 0 0 auto;
display: flex;
flex-direction: row;
align-items: center;
min-width: 300px;
}

&.add-buttons {
> .add-buttons {
flex-direction: row;
min-height: 30px;
color: rgba(var(--body-color), 0.4);
width: 100%;
align-items: flex-start;
.Icon {
margin-left: 0.5em;
}
.Button {
display: none;
}
Expand All @@ -30,7 +35,7 @@
flex-grow: 1;
}

&.description > * {
> .description > * {
flex-grow: 1;
}
}
Loading