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

Remove css-in-js button styles from core #139

Merged
merged 7 commits into from
Mar 14, 2024
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
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"]{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use .panel-title class instead of id begins with selector? Or is the class used elsewhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"panel-title" class is not used in all panels :-(. This is the only selector I found that works for all collapsible panels.

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;
}
dmijatovic marked this conversation as resolved.
Show resolved Hide resolved
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
Loading