Skip to content

Css for Repl #45

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

Merged
merged 8 commits into from
Apr 28, 2022
Merged

Css for Repl #45

merged 8 commits into from
Apr 28, 2022

Conversation

princiya
Copy link
Contributor

Screenshot 2022-04-25 at 19 30 25

I am trying to remove the black dotted border that appears when repl is focused, but the styles come from Codemirror.net. I was able to extend the theme but not able to override the dotted outline, will try to figure out more and improve CSS for Repl2 next.

@princiya princiya requested a review from fpliger April 25, 2022 17:47
Copy link
Contributor

@fpliger fpliger left a comment

Choose a reason for hiding this comment

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

Looks great (just left a minor comment)! 🚀 Thank you

@@ -80,12 +79,20 @@ export class PyRepl extends BaseEvalElement {
// }
// })
];
const customTheme = EditorView.theme({
Copy link
Contributor

Choose a reason for hiding this comment

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

Picky comment here.. Maybe we could move this config to the top of the file as a const for more exposure?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is to the top of the corresponding function, the linter took care of this one.

@fpliger
Copy link
Contributor

fpliger commented Apr 26, 2022

@princiya are you ready to merge this (after conflicts are resolved) or did you want to address anything else?

@philippjfr philippjfr added tag: styling Related to the styling of pyscript components status: ready PR that is ready for review status: accepted PR that has been reviewed and accepted and removed status: ready PR that is ready for review labels Apr 26, 2022
@princiya
Copy link
Contributor Author

@fpliger I will also address the repl2 component's styling in this PR itself. Thanks for the design suggestions.

@fpliger fpliger added status: WIP PR that is not yet ready for review and removed status: accepted PR that has been reviewed and accepted labels Apr 26, 2022
@@ -10,6 +10,25 @@
<link rel="stylesheet" href="../build/pyscript.css" />

<script defer src="../build/pyscript.js"></script>

<style>
#output > div {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not find any other way to style the right output panel other than directly adding CSS here.
I tried to add CSS in interpreter.js in the write function, but that function (sometimes) also renders additional div element. That's why I chose to control the empty div elements via CSS

Copy link
Contributor

Choose a reason for hiding this comment

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

How about we add the additional css to separate file? It'd make the example look cleaner

@princiya
Copy link
Contributor Author

princiya commented Apr 27, 2022

Screenshot 2022-04-28 at 00 31 15


Screenshot 2022-04-28 at 00 32 51

@princiya princiya added status: ready PR that is ready for review and removed status: WIP PR that is not yet ready for review labels Apr 27, 2022
Copy link
Contributor

@fpliger fpliger left a comment

Choose a reason for hiding this comment

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

Great work, thank you! Left a couple of minor comments.. if you can take care of them quickly great, otherwise we can merge and I fix it in a quick follow up PR

@@ -10,6 +10,25 @@
<link rel="stylesheet" href="../build/pyscript.css" />

<script defer src="../build/pyscript.js"></script>

<style>
#output > div {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about we add the additional css to separate file? It'd make the example look cleaner

// add Editor to main PyScript div

Copy link
Contributor

Choose a reason for hiding this comment

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

can we delete these?

@princiya princiya merged commit b207db9 into main Apr 28, 2022
@princiya princiya deleted the css-repl branch April 28, 2022 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready PR that is ready for review tag: styling Related to the styling of pyscript components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants