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

Themes #208

Open
wants to merge 300 commits into
base: testing
Choose a base branch
from
Open

Themes #208

wants to merge 300 commits into from

Conversation

aswinm
Copy link
Collaborator

@aswinm aswinm commented Apr 12, 2021

No description provided.

browser/components/modal/Modal.js Outdated Show resolved Hide resolved
browser/components/shared/button/CloseButton.js Outdated Show resolved Hide resolved
browser/components/shared/button/CloseButton.js Outdated Show resolved Hide resolved
browser/components/shared/dialogue/Dialogue.js Outdated Show resolved Hide resolved
browser/components/shared/dialogue/Dialogue.js Outdated Show resolved Hide resolved
browser/constants.js Outdated Show resolved Hide resolved
browser/index.js Outdated Show resolved Hide resolved
browser/index.js Outdated Show resolved Hide resolved
browser/themes/DarkTheme.js Outdated Show resolved Hide resolved
browser/themes/DarkTheme.js Outdated Show resolved Hide resolved
browser/components/shared/title/Title.js Outdated Show resolved Hide resolved
browser/components/shared/title/Title.js Outdated Show resolved Hide resolved
browser/components/shared/icons/SvgIcon.js Outdated Show resolved Hide resolved
browser/components/DataSelectorDialogue.js Outdated Show resolved Hide resolved
browser/components/DataSelectorDialogue.js Outdated Show resolved Hide resolved
browser/components/shared/icons/icons/cleaning-spray.svg Outdated Show resolved Hide resolved
browser/components/shared/icons/icons/no3.svg Outdated Show resolved Hide resolved
browser/components/shared/title/CardTitle.js Outdated Show resolved Hide resolved
browser/helpers/colors.js Outdated Show resolved Hide resolved
browser/themes/DarkTheme.js Outdated Show resolved Hide resolved
browser/themes/DarkTheme.js Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
browser/components/shared/list/CheckBoxList.js Outdated Show resolved Hide resolved
browser/components/shared/list/CheckBoxList.js Outdated Show resolved Hide resolved
shared/icons/icons.ts Show resolved Hide resolved
browser/api/projects/Projects.js Outdated Show resolved Hide resolved
browser/api/projects/Projects.js Outdated Show resolved Hide resolved
browser/components/DataSelectorDialogue.js Outdated Show resolved Hide resolved
browser/components/DataSelectorDialogue.js Outdated Show resolved Hide resolved
browser/components/DataSelectorDialogue.js Outdated Show resolved Hide resolved
browser/components/ProjectList.js Outdated Show resolved Hide resolved
browser/components/shared/button/ButtonGroup.js Outdated Show resolved Hide resolved
browser/components/shared/constants/align.js Outdated Show resolved Hide resolved
browser/components/shared/inputs/RadioButton.js Outdated Show resolved Hide resolved
response.json().then((results) => {
console.log(results);
results.map((project) => {
project.permalink = getPermalinkForProject(project);
Copy link
Collaborator

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 {
Copy link
Collaborator

@Bo-Carlsson Bo-Carlsson May 11, 2021

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.

const metaUrl = '/api/meta/jupiter/';

export default class MetaApi {
fetchMetaData(parameter) {
Copy link
Collaborator

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;
Copy link
Collaborator

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} />
Copy link
Collaborator

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 {
Copy link
Collaborator

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) => {
Copy link
Collaborator

@Bo-Carlsson Bo-Carlsson May 21, 2021

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,
Copy link
Collaborator

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

MathiasBuus and others added 30 commits June 17, 2022 15:34
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants