Skip to content

Commit

Permalink
Merge pull request #139 from i-VRESSE/78-node-button-styles
Browse files Browse the repository at this point in the history
Remove css-in-js button styles from core
  • Loading branch information
dmijatovic authored Mar 14, 2024
2 parents 7995da2 + 41b32a2 commit ddc0190
Show file tree
Hide file tree
Showing 19 changed files with 652 additions and 245 deletions.
128 changes: 114 additions & 14 deletions apps/haddock3-download/src/App.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,120 @@
/*
Customise workflow builder components
*/

.page {
padding: 1em;
display: grid;
width: 100%;
height: 100vh;
grid-template-areas: "head head head"
"catalog workflow node"
"catalog workflow-actions node-actions";
grid-template-columns: 1fr 1fr 2fr;
grid-template-rows: auto 1fr auto;
column-gap: 0.5rem;
padding: 1em;
display: grid;
width: 100%;
height: 100vh;
grid-template-areas: "head head head"
"catalog workflow node"
"catalog workflow-actions node-actions";
grid-template-columns: min-content minmax(12rem,1fr) minmax(20rem,2fr);
grid-template-rows: auto 1fr auto;
column-gap: 1rem;
}

/* Style workflow area section */
.workflow-area {
display: flex;
flex-direction: column;
}

/* Style various form buttons */
.btn {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
}

.btn-visual-panel,
.btn-catalog-node {
width: 100%;
}

.btn-group {
display: flex;
gap: 0.5rem;
}

/* remove gap from dropdown group */
.dropdown.btn-group {
gap: 0rem;
}

/* center + icon in the button */
.array-item-add{
display: flex;
justify-content: center;
align-items: center;
}

.no-wrap{
text-wrap: nowrap;
}

ul{
padding: 0.25rem 0.25rem 0.25rem 1.25rem;
}

.page > div {
overflow: auto;
li{
list-style-type: none;
}

.action-row {
padding: 0.25rem
li > ul{
padding: 0rem;
}

div[role="button"],
.btn-catalog-node{
margin: 0.5rem 0rem;
cursor: pointer;
}

/* Format actions section at the bottom */
.action-row,
.action-row>.nav {
display: flex;
gap: 1rem;
padding: 0.25rem;
}

.action-row>.nav {
flex: 1;
justify-content: flex-end;
}


.btn-toolbar{
display: flex;
gap: 1rem;
padding: 1rem 0rem;
}

/* Show panel section is clickable */
h5[id^="expander4"]{
cursor: pointer;
}
/* Allow scrollbars in the card when content is too large */
.card-body{
overflow: auto;
}

/* Alow scrollbars on tables which exceed card width */
.form-group > fieldset {
overflow: auto;
}

/* hide commands by default */
.btn-catalog-node .grip,
.btn-visual-node .btn-group{
visibility: hidden;
}

/* show commands on hover */
.btn-catalog-node:hover .grip,
.btn-visual-node:hover .btn-group {
visibility: visible;
}
4 changes: 2 additions & 2 deletions apps/haddock3-download/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
WorkflowUploadButton,
Wrapper
} from '@i-vresse/wb-core'

import '@i-vresse/wb-form/dist/index.css'
import 'bootstrap/dist/css/bootstrap.min.css'
import './App.css'

function App (): JSX.Element {
Expand All @@ -27,7 +27,7 @@ function App (): JSX.Element {
<CatalogPicker />
</CatalogPanel>
</GridArea>
<GridArea area='workflow'>
<GridArea area='workflow' className='workflow-area'>
<WorkflowPanel>
<WorkflowUploadButton />
</WorkflowPanel>
Expand Down
3 changes: 1 addition & 2 deletions apps/haddock3-download/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ body {
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}
2 changes: 2 additions & 0 deletions apps/haddock3-download/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react'
import ReactDOM from 'react-dom'

import 'bootstrap/dist/css/bootstrap.min.css'
import './index.css'
import App from './App'

Expand Down
117 changes: 109 additions & 8 deletions apps/haddock3-galaxy/src/App.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,122 @@
/*
Customise workflow builder components
NOTE! copy of apps/haddock3-download/src/App.css
*/

.page {
padding: 1em;
display: grid;
width: 100%;
height: 100vh;
grid-template-areas: "head head head"
"catalog workflow node"
"catalog workflow-actions node-actions";
grid-template-columns: 1fr 1fr 2fr;
"catalog workflow node"
"catalog workflow-actions node-actions";
grid-template-columns: min-content minmax(12rem, 1fr) minmax(20rem, 2fr);
grid-template-rows: auto 1fr auto;
column-gap: 0.5rem;
column-gap: 1rem;
}

.page > div {
overflow: auto;
/* Style workflow area section */
.workflow-area {
display: flex;
flex-direction: column;
}

/* Style various form buttons */
.btn {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
}

.btn-visual-panel,
.btn-catalog-node {
width: 100%;
}

.btn-group {
display: flex;
gap: 0.5rem;
}

/* remove gap from dropdown group */
.dropdown.btn-group {
gap: 0rem;
}

/* center + icon in the button */
.array-item-add {
display: flex;
justify-content: center;
align-items: center;
}

.no-wrap {
text-wrap: nowrap;
}

.page > .action-row {
ul {
padding: 0.25rem 0.25rem 0.25rem 1.25rem;
}

li {
list-style-type: none;
}

li>ul {
padding: 0rem;
}

div[role="button"],
.btn-catalog-node {
margin: 0.5rem 0rem;
cursor: pointer;
}

/* Format actions section at the bottom */
.action-row,
.action-row>.nav {
display: flex;
gap: 1rem;
padding: 0.25rem;
overflow: unset;
}

.action-row>.nav {
flex: 1;
justify-content: flex-end;
}


.btn-toolbar {
display: flex;
gap: 1rem;
padding: 1rem 0rem;
}

/* Show panel section is clickable */
h5[id^="expander4"] {
cursor: pointer;
}

/* Allow scrollbars in the card when content is too large */
.card-body {
overflow: auto;
}

/* Alow scrollbars on tables which exceed card width */
.form-group>fieldset {
overflow: auto;
}

/* hide commands by default */
.btn-catalog-node .grip,
.btn-visual-node .btn-group {
visibility: hidden;
}

/* show commands on hover */
.btn-catalog-node:hover .grip,
.btn-visual-node:hover .btn-group {
visibility: visible;
}
2 changes: 1 addition & 1 deletion apps/haddock3-galaxy/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function App (): JSX.Element {
<CatalogPicker catalogIndexURL={catalogIndexURL} />
</CatalogPanel>
</GridArea>
<GridArea area='workflow'>
<GridArea area='workflow' className='workflow-area'>
<WorkflowPanel>
<WorkflowUploadButton />
</WorkflowPanel>
Expand Down
Loading

0 comments on commit ddc0190

Please sign in to comment.