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

MAINT: Lint html #1021

Merged
merged 6 commits into from
Nov 22, 2022
Merged

MAINT: Lint html #1021

merged 6 commits into from
Nov 22, 2022

Conversation

12rambau
Copy link
Collaborator

@12rambau 12rambau commented Oct 17, 2022

I found djlint, a html linter compatible with jinja.
In this PR I added some parameters, add the test in the pre-commits and run djlint on the whole html files.

@12rambau 12rambau marked this pull request as ready for review November 10, 2022 11:07
Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

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

The HTML seems fine to me, and I'm generally a fan of using linting/bot formatting to avoid quibbling over syntax choices etc, so +1 from me! I had a few comments about double-checking that we are diffing properly though

<a class="theme-switch" data-mode="dark"><i class="fa-regular fa-moon"></i></a>
<a class="theme-switch" data-mode="auto"><i class="fa-solid fa-circle-half-stroke"></i></a>
</span>
<button class="theme-switch-button btn btn-sm btn-outline-primary navbar-btn rounded-circle" title="{{ _('light/dark') }}" aria-label="{{ _('light/dark') }}" data-toggle="tooltip">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Didn't this span -> button change get merged already? We should double check that we are doing this from the latest commit

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I started this PR before the merge of #1050. when I merged it back in the line has been analyzed as a change (with the linting)

{%- endblock body_tag %}
<body data-spy="scroll" data-target="#bd-toc-nav" data-offset="180" data-default-mode="{{ default_mode }}">

{# A button hidden by default to help assistive devices quickly jump to main content #}
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here - this seems like it's being added even though this was already merged into main

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

same here

@choldgraf
Copy link
Collaborator

If you don't think this changes anything problematic then I think we should just merge it in because it'll become out of date quickly, what do you think?

@12rambau
Copy link
Collaborator Author

I'd like to prevent any merge before release of 0.12.0 but I would be ok straight after it

@choldgraf
Copy link
Collaborator

as I worried, this one is now out of date :-) want to resolve the conflicts and then we can merge quickly?

@12rambau
Copy link
Collaborator Author

there's a linting issue that is solved in #1070. Whenever it's merged, we can merge this one

@choldgraf choldgraf changed the title MAINT: lint html MAINT: Lint html Nov 22, 2022
@choldgraf choldgraf merged commit 7ed90c2 into pydata:main Nov 22, 2022
@choldgraf
Copy link
Collaborator

alright let's merge this so that we can see how it feels in practice!

@12rambau 12rambau deleted the djlint branch November 22, 2022 16:07
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.

2 participants