-
Notifications
You must be signed in to change notification settings - Fork 16
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
Layout components #145
Layout components #145
Conversation
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.
🌟 🎨
.pylintrc
Outdated
duplicate-code, | ||
too-few-public-methods, | ||
invalid-name, | ||
too-many-arguments |
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.
Missing new line. See this is the case for other files also.
react/package.json
Outdated
@@ -22,7 +22,7 @@ | |||
"tidy-up": "rimraf ./R && rimraf ./dist && rimraf ./inst && rimraf ./man && rimraf ./.Rbuildignore", | |||
"build:js": "webpack --mode production --entry ./dist/index.js", | |||
"build:js-dev": "webpack --mode development --entry ./dist/index.js", | |||
"build:py_and_r": "npm run transpile:dash && cp -a ../webviz_core_components/. ./webviz_core_components/ && cp ./package.json ./webviz_core_components/package.json && dash-generate-components ./dist/components webviz_core_components -p package.json --r-prefix '' --ignore '(^index.js|.stories.js)$' && cp -a ./webviz_core_components/. ../webviz_core_components/ && rimraf ./webviz_core_components", | |||
"build:py_and_r": "npm run transpile:dash && cp -aR ../webviz_core_components/. ./webviz_core_components/ && cp ./package.json ./webviz_core_components/package.json && dash-generate-components ./dist/components webviz_core_components -p package.json --r-prefix '' --ignore '(^index.js|.stories.js)$' && cp -a ./webviz_core_components/. ../webviz_core_components/ && rimraf ./webviz_core_components", |
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.
Just for understanding, what does adding -a
solve?
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.
Since I added the a
😉
-a
is a shortcut for -dR --preserve=all
.
d
: shortcut for--no-dereference --preserve=links
(never follow symbolic links in SOURCE
, preserve links)R
: copy directories recursively--preserve=all
: preserves all attributes (mode, ownership, timestamps..)
Hence, I am a bit surprised that you needed to add the R
since it should be included in the -a
flag 😕
Ref: https://man7.org/linux/man-pages/man1/cp.1.html
However, I was wondering for a while now if we should rather become platform independent and remove the cp
entirely. There is a CLI version of fs-extra
which provides all functionality we need. We could also replace rimraf
then. See: https://www.npmjs.com/package/@atao60/fse-cli
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.
I you are right that R
is not needed. Will remove!
), | ||
) | ||
) | ||
self.children = html.Div(style={"fontSize": "15px"}, children=children) |
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.
Is the utility here something that is now more naturally placed in this file?
https://github.com/equinor/webviz-config/blob/master/webviz_config/utils/_dash_component_utils.py
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.
good idea!
*args: Any, | ||
**kwargs: Any, | ||
) -> None: | ||
super().__init__(*args, **kwargs) |
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.
What does it do compared with dcc.Tabs
? To be implemented?
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.
Mainly added for ease of use. It is used together with the Tab
component which is wrapped here with some styling.
ae88691
to
600a71f
Compare
.webviz-slider .rc-slider-track { | ||
background-color: var(--menuLinkColor) !important; | ||
} | ||
|
||
.webviz-slider .rc-slider-dot-active { | ||
border-color: var(--menuLinkHoverColor) !important; | ||
border-color: var(--menuLinkHoverColor) !important; | ||
} | ||
|
||
.webviz-slider .rc-slider-handle { | ||
background-color: var(--menuLinkHoverColor) !important; | ||
border-color: var(--menuLinkHoverColor) !important; | ||
} | ||
|
||
.webviz-slider .rc-slider-handle-active:active { | ||
border-color: var(--menuLinkHoverColor) !important; | ||
box-shadow: 0 0 5px var(--menuLinkHoverColor) !important; | ||
} | ||
|
||
.webviz-slider .rc-slider-dot { | ||
margin-left:-10px !important; | ||
background-color: var(--menuBackground) !important; | ||
border-color: var(--menuLinkHoverColor) !important; | ||
} |
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.
Add a comment here explaining why !important
is necessary?
.webviz-tab { | ||
border-bottom: 1px solid #d6d6d6 !important; | ||
padding: 6px !important; | ||
font-weight: bold !important; | ||
} | ||
|
||
.webviz-tab-selected { | ||
border-top: 1px solid #d6d6d6 !important; | ||
border-bottom: 1px solid #d6d6d6 !important; | ||
background-color: #007079 !important; | ||
color: white !important; | ||
padding: 6px !important; | ||
} |
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.
And here as well 🙂
react/src/lib/index.ts
Outdated
import "./components/Layout" | ||
export { WebvizPluginPlaceholder, ColorScales, Select, SmartNodeSelector }; |
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.
import "./components/Layout" | |
export { WebvizPluginPlaceholder, ColorScales, Select, SmartNodeSelector }; | |
import "./components/Layout" | |
export { WebvizPluginPlaceholder, ColorScales, Select, SmartNodeSelector }; |
600a71f
to
9125700
Compare
9125700
to
4a69906
Compare
Relates to #144
Adds a set of python component wrapping existing components from
dash_html_components
anddash_core_components
.,with e.g. additional styling and inclusion of labels.