Skip to content

Conversation

@nvaytet
Copy link
Member

@nvaytet nvaytet commented Sep 19, 2023

Since all the configuration options for the plotting have been removed (plotting is now all done in Plopp), the configuration options are rather limited.
There is probably no one who is changing the colors of the buttons in jupyter lab.

To remove the confuse runtime dependency of scipp, we remove the configuration entirely.

@nvaytet nvaytet requested a review from jl-wynen September 19, 2023 11:23
Copy link
Member

@jl-wynen jl-wynen left a comment

Choose a reason for hiding this comment

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

What is you plan with plopp? Do you want to add a config file there?

Copy link
Member

Choose a reason for hiding this comment

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

Why did you move code here as part of this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because I thought it made more sense to group the visualizations together and put the stuff about colors there, since it is only used by the different visualizations?

'button_selected': '#bdbdbdbb', # Color for selected plot control button.
'header_text': '#111111', # Color for table header text.
'hover': '#d6eaf8', # Color for hovering on table rows.
}
Copy link
Member

Choose a reason for hiding this comment

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

Where is this used? Shouldn't this be part of Plopp?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is used in the css style we are injecting in the html repr?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Can you move those into the CSS. There is no reason to keep them in Python when we can't customise them anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you point me to where that is? I can't seem to find the right place to put this. Thanks

Copy link
Member Author

Choose a reason for hiding this comment

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

But then if it is no longer a template, the data_color would have to be duplicated in the colors.py file (used by e.g. sc.show) and in the style.css file.

It seems that button, button_selected, and hover are not used in the style.css.template and that only header_text would be the one that lives only in style.css?

Copy link
Member

Choose a reason for hiding this comment

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

It seems that button, button_selected, and hover are not used in the style.css.template and that only header_text would be the one that lives only in style.css?

The buttons are from back when we had custom buttons on plots that looked a little different from the builtin ones. So this can probably be removed.

Do we actually still use colours in CSS? Or can we drop them with the newer simplified table views?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we actually still use colours in CSS? Or can we drop them with the newer simplified table views?

Good question. How can I test/find this out?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess the prefix sc-table in the css implies it's only used for the html table representation?

Copy link
Member

Choose a reason for hiding this comment

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

Grepping for sc-table onyl gives me results in css. So the python code never even generates HTML elements with this class. But best double check the implementation before removing anything.

@nvaytet
Copy link
Member Author

nvaytet commented Sep 26, 2023

What is you plan with plopp? Do you want to add a config file there?

Not for now. No one has asked for one, so until then...

beautifulsoup4==4.12.2
# via
# -r test.in
# -r requirements/test.in
Copy link
Member

Choose a reason for hiding this comment

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

I you run pip-compile-multi from within the requirements folder you won't get this update noise.

@@ -0,0 +1,9 @@
# SPDX-License-Identifier: BSD-3-Clause
Copy link
Member

Choose a reason for hiding this comment

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

Can you make this singular, visualization? I think having plural on module names is not so common?

@nvaytet nvaytet merged commit fe4fd02 into main Oct 11, 2023
@nvaytet nvaytet deleted the remove-config branch October 11, 2023 10:46
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