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

In devtools show confirmation of successfully loading CSS after a previous fail #2716

Merged
merged 3 commits into from
Jun 1, 2023

Conversation

davep
Copy link
Contributor

@davep davep commented Jun 1, 2023

See #2534

Screenshot 2023-06-01 at 16 00 17

@davep davep added enhancement New feature or request Task labels Jun 1, 2023
@davep davep self-assigned this Jun 1, 2023
Comment on lines +1251 to +1261
if self._css_has_errors:
from rich.panel import Panel

self.log.system(
Panel(
"CSS files successfully loaded after previous error:\n\n- "
+ "\n- ".join(str(path) for path in css_paths),
style="green",
border_style="green",
)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be in the else statement already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already? Not sure I follow. This is something new. Extra bit of logging to go with the existing logging.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ignore the "already", then.
Shouldn't this be the first piece of code in the else instead of the last piece of code in the try?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh I see. That would work too, but I was keeping the logging with the existing logging.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe both logs should be in the else statement. 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would work too, of course, but I feel keeping the reporting of the elapsed time closer to the calculation of it makes for an easier read.

@davep davep merged commit 81ec818 into Textualize:main Jun 1, 2023
@davep davep deleted the css-good-life-reload-confirmation branch June 1, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Textual Console should report working CSS after reporting an error
3 participants