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

html validation at catalog #4594

Closed

Conversation

ArunTeltia
Copy link
Contributor

Working on #2798

This pr is the continuation of #4284

Stakeholders

@mekarpeles @jdlrobson

@jdlrobson jdlrobson self-requested a review February 17, 2021 04:35
@jdlrobson jdlrobson self-assigned this Feb 17, 2021
@@ -32,7 +32,7 @@ <h1>Merge duplicate editions</h1>

{{ pager() }}

{{ total }} items need to be merged ({{ easy }} easy)<p>
{{ total }} items need to be merged ({{ easy }} easy)</p>
Copy link
Collaborator

Choose a reason for hiding this comment

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

this doesn't look right to me. I think the problem here is that the macro pager creates a p tag but doesn't xlose it. Why don't we change the pager method to accept a string

e.g. {{ pager( '{{ %s }} items need to be merged ({{ %s }} easy)'%(total, easy) }}

OR let's not open that p tag in the macro pager.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay working on it

@jdlrobson
Copy link
Collaborator

Is there anything I can do to help with this one @ArunTeltia ?

@ArunTeltia
Copy link
Contributor Author

Can you have a look now

@jdlrobson jdlrobson self-requested a review February 28, 2021 05:00
{% endmacro %}

{{ pager() }}

{{ total }} items need to be merged ({{ easy }} easy)<p>
{{ total }} items need to be merged ({{ easy }} easy)
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this entire line be inside a p? i'm wondering if the

at the end was meant to close the one inside the macro originally?

e.g.
<p> {{ total }} items need to be merged ({{ easy }} easy)</p>

@@ -27,12 +27,12 @@ <h1>Merge duplicate editions</h1>
<a href="?page={{ i + 1 }}">{{ i + 1}}</a>
{% endif %}
{% endfor %}
<p>

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@jdlrobson
Copy link
Collaborator

What URI are you testing these changes on @ArunTeltia ?

@ArunTeltia
Copy link
Contributor Author

Actually I was not checking in any URI I had just created a manual list in a paper and I am just checking HTML validation in each page manually.

@jdlrobson
Copy link
Collaborator

Actually I was not checking in any URI I had just created a manual list in a paper and I am just checking HTML validation in each page manually.

Please do not do this in the future as this is a very important part of the code review process and can save everyone a lot of time. If you are not sure about things questions are encouraged. Particularly with any frontend change you'll want to know which page to test on before taking on a patch.

Having looked at this myself, I'm now convinced this is dead code, so we've wasted a few hours on code that is not running anywhere.

@cdrini @mekarpeles could you please clarify how merge feature works? From looking at the code, I'm pretty sure the merge feature doesn't use any templates and if that's true we should just delete them all.

@cdrini
Copy link
Collaborator

cdrini commented Mar 4, 2021

Unfortunately this does look like dead code :( Sorry for the run-around @ArunTeltia ! And sorry to you both that you had to spend time fixing dead code 😓 Looks like we can delete editions_merge directory entirely and anything that references it 👍

@cdrini cdrini closed this Mar 4, 2021
@cdrini
Copy link
Collaborator

cdrini commented Mar 4, 2021

In general, any .html with {{ ... }} style interpolation instead of $( ... ) is very likely dead code.

@cdrini
Copy link
Collaborator

cdrini commented Mar 4, 2021

Created issue here: #4722

@ArunTeltia
Copy link
Contributor Author

No problem sir working on it ☺️

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.

3 participants