-
Notifications
You must be signed in to change notification settings - Fork 6
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
Themes #208
base: testing
Are you sure you want to change the base?
Conversation
response.json().then((results) => { | ||
console.log(results); | ||
results.map((project) => { | ||
project.permalink = getPermalinkForProject(project); |
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.
Nice move :-)
if (item.f_table_title == 'Jupiter boringer') { | ||
value = 'v:system.all'; | ||
} | ||
return { |
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.
Data mapping is not the responsibility of the DataSelectorDialogue
. The [...]Api.js
will handle this.
browser/api/meta/MetaApi.js
Outdated
const metaUrl = '/api/meta/jupiter/'; | ||
|
||
export default class MetaApi { | ||
fetchMetaData(parameter) { |
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.
Rename to getMetaData
width: ${theme.layout.gutter * 2}px; | ||
width: ${theme.layout.gutter * 7}px; | ||
font: ${theme.fonts.label}; | ||
height: 19px; |
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.
Let's set this to 24px
<Root key={index} spacing={Spacing.Lite} onClick={() => applySnapshot()} onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)}> | ||
<Grid container> | ||
<Grid container item md={7}> | ||
<Icon name='dashboard' variant={Variants.Primary} strokeColor={isHovered ? DarkTheme.colors.primary[2] : DarkTheme.colors.primary[4]} size={24} marginRight={8} /> |
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.
Set strokecolor from parents CSS instead of by property
cursor: pointer; | ||
margin-top: ${props => props.theme.layout.gutter/2}px; | ||
padding: ${props => props.theme.layout.gutter/4}px; | ||
&:hover { |
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.
We can style childcomponents directly from the parent
&:hover ${Icon} {
strokeColor: props.theme.colors.primary[2];
}
@@ -11,9 +11,14 @@ Button.propTypes = { | |||
} | |||
|
|||
function Button(props) { | |||
const onClick = (e) => { |
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.
Why introducing a function instead of onClick={props.onClick && props.onClick}
@@ -5,11 +5,15 @@ import PropTypes from 'prop-types'; | |||
ButtonGroup.propTypes = { | |||
text: PropTypes.string, | |||
align: PropTypes.string, | |||
marginTop: PropTypes.number, |
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.
Exposing styling attributes is a never ending road that leads to a bloated api for the component :-)
Each component should have a default style/layout, but styling based on the context it is used in, should be handled by the parent.
https://stackoverflow.com/questions/49619754/how-to-style-child-components-in-react-styled-components
Conditional showing of latest value
Særskilte lag are layers that are free to see for everyone, but we dont want in the start menu. If specific people want it in the start menu it can be added via privileges
Teamcity test
No description provided.