Intellij Idea warns the formatting style used in Changes.html isn't allowed

29 views
Skip to first unread message

krsk...@gmail.com

unread,
Aug 22, 2021, 3:15:34 PM8/22/21
to okapi-devel
changes.html is using this sequence of tags:

<ul>
<li>Core:</li>
<ul> <!-- This is illegal according to Intellij -->
<li>issue 1</li>
<li>issue 2</li>
...
</ul>
</ul>

Although I haven't checked the HTML formal spec, <ul> directtly within <ul> doesn't make sense. Probably <li> element is the only allowed element.

Perhaps we should correct it to:

<ul>
<li>Core:
  <ul>
    <li>issue 1</li>
    <li>issue 2</li>
     ...
   <'ul>
</ul>
?

Or wouldn't this even better?

<h3>Core</h3>
<ul>
 <li>issue 1</li>
 <li>issue 2</li>
  ...
</ul>

p.s. In changes.html that I changed in my pull request, I followed the current practice.

jim

unread,
Aug 22, 2021, 4:29:56 PM8/22/21
to okapi...@googlegroups.com, krsk...@gmail.com
The last option would have my vote. But I suspect the copy and paste practice will continue unless someone changes it :-)

Jim
--
You received this message because you are subscribed to the Google Groups "okapi-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/okapi-devel/e51eaaef-43a2-4762-8bd6-ee6204390e2bn%40googlegroups.com.

krsk...@gmail.com

unread,
Aug 22, 2021, 5:07:46 PM8/22/21
to okapi-devel
I can volunteer to manually change the format for the part for the next release (1.42.0-SNAPSHOT).
There are still a manageable number of changes.

Chase Tingley

unread,
Aug 22, 2021, 5:18:39 PM8/22/21
to okapi...@googlegroups.com
The current idea is to have nested lists like this:

Screenshot 2021-08-22 141547.png

The first option you suggested (putting the nested <ul> inside the <li>) seems like it would still achieve this.  The second option wouldn't, although you could use h2/h3 to imply a hierarchy, as you suggested.

Jean-Christophe Helary

unread,
Aug 22, 2021, 7:06:01 PM8/22/21
to okapi...@googlegroups.com


> On Aug 23, 2021, at 4:15, krsk...@gmail.com <krsk...@gmail.com> wrote:
>
> changes.html is using this sequence of tags:
>
> <ul>
> <li>Core:</li>
> <ul> <!-- This is illegal according to Intellij -->
> <li>issue 1</li>
> <li>issue 2</li>
> ...
> </ul>
> </ul>
>
> Although I haven't checked the HTML formal spec, <ul> directtly within <ul> doesn't make sense. Probably <li> element is the only allowed element.

You're correct.

https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element

--
Jean-Christophe Helary @brandelune
https://mac4translators.blogspot.com
https://sr.ht/~brandelune/omegat-as-a-book/

krsk...@gmail.com

unread,
Sep 15, 2021, 12:31:54 PM9/15/21
to okapi-devel
How can we reach a consensus on this question? Should we nest <ul> within <li> to encode hierarchical relationship or use <hN> to imply it?

jim

unread,
Sep 15, 2021, 1:36:49 PM9/15/21
to okapi...@googlegroups.com, krsk...@gmail.com
I vote for <hN> as it is much easier to read and write. I always make mistakes getting the embeddings right.

Jim
--
You received this message because you are subscribed to the Google Groups "okapi-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-devel...@googlegroups.com.

Alessandro Falappa

unread,
Sep 16, 2021, 3:03:12 AM9/16/21
to Group: okapi-devel
+1 to use hierarchical HTML headings

Regards


Alessandro Falappa
Integrations Team Leader


krsk...@gmail.com

unread,
Oct 14, 2021, 1:16:43 PM10/14/21
to okapi-devel
Hi All,
I am willing to volunteer to manually edit deployment/shared/changes.html to use <hN> to avoid having <ul> within <ul>, but I can only do it for the part about the next  release, leaving the sections about the past releases non-conformant. (I thought about writing a script but that doesn't seem easy.)  Should I do that ? If so, can I directly edit the dev branch, or do I still make a change in a new branch and make a pull request like a regular code change?

Kuro

Yves

unread,
Oct 27, 2021, 7:32:49 AM10/27/21
to okapi-devel
Hi Kuro,

Feel free to make the change directly in dev. Since it doesn't affect the code we can use this quicker way.

-ys

krsk...@gmail.com

unread,
Oct 29, 2021, 4:35:39 AM10/29/21
to okapi-devel
Thank you.
I was able to apply XSLT and change all occurrences of html/body/ul/li to use <h3> instead of <li>,
and move all li elements in html/body/ul/ul to html/body/ul.

I found, however, there are patterns of  html/body/ul/ul/ul. I'm trying to figure out what to do with that. Here's an example:

   <h2>Changes from M30 to M31</h2>

    <ul>

      <li>Filters:</li>

      <ul>

        <li>General:</li>

        <ul>

          <li>Fixed issue #519: When using the subfilter feature in several

            filters (including JSON, YAML, ITS, and XML Stream), it is no longer

            possible to produce multiple text units with the same ID.</li>

        </ul>

To be consistent, I think this should be: <h4>General</h4> and the twice nested ul should be demoted to the top level ul, but can I do that with a simple XSLT is another question. If it becomes too complex, I'll just leave this part as is.

And there is the usual EOL issue :-( In my workspace, deployment/shared/changes.html has CR/LF endings despite that I'm on Mac.
And after running xlstproc, it now has mixed EOLs. Would forcing the modified changes.html to LF-only and check-in safer ? Or the other way?

krsk...@gmail.com

unread,
Oct 29, 2021, 6:56:59 PM10/29/21
to okapi-devel
I gave up the effort of mechanical conversion by use of XLST. Too much complication.
Instead I ended up manually converting the first two release sections, leaving the rest of sections intact.
Before committing this, I'd like to show you how it looks on screen (Chrome on Mac):

Screen Shot 2021-10-29 at 3.44.33 PM.png

Please compare this with how it looks using the other idea (neseted ul/li/ul/li instead of illegal ul/ul/li):
Screen Shot 2021-10-29 at 3.47.34 PM.png


If I don't hear any objection, I will commit the header version.


changes-alt.html
changes-with-hX.html

krsk...@gmail.com

unread,
Oct 30, 2021, 8:44:54 PM10/30/21
to okapi-devel
I'll postpone committing my change to changes.html as Mihai seems to be modifying the file as we spoke, and I am having a second thought about which format is better and other member might have a similar thought.

Kuro

jim

unread,
Oct 31, 2021, 12:24:13 PM10/31/21
to okapi...@googlegroups.com, krsk...@gmail.com
It looks like we lost all the changes for several releases (41 and 42) in the release. Maybe a forgotten commit?

No worries we can update from the history. Many thanks for the effort on the release!

Jim

jim

unread,
Oct 31, 2021, 12:34:19 PM10/31/21
to okapi...@googlegroups.com, krsk...@gmail.com
The changes.html in the source tree is fine.

It's the one here that is not up to date: https://okapiframework.org/snapshots/

Jim

Yves Savourel

unread,
Oct 31, 2021, 5:56:05 PM10/31/21
to okapi...@googlegroups.com

This is the old place where we had the distributions put manually.

That should be gone since we have an automated setup now.

I’ll clean that up.

 

From: okapi...@googlegroups.com <okapi...@googlegroups.com> On Behalf Of jim
Sent: Sunday, October 31, 2021 5:34 PM
To: okapi...@googlegroups.com; krsk...@gmail.com <krsk...@gmail.com>
Subject: Re: [okapi-devel] Intellij Idea warns the formatting style used in Changes.html isn't allowed

 

The changes.html in the source tree is fine.

It's the one here that is not up to date: https://okapiframework.org/snapshots/

Jim

On 10/31/21 10:24 AM, jim wrote:

It looks like we lost all the changes for several releases (41 and 42) in the release. Maybe a forgotten commit?

No worries we can update from the history. Many thanks for the effort on the release!

Jim

On 10/30/21 6:44 PM, krsk...@gmail.com wrote:

I'll postpone committing my change to changes.html as Mihai seems to be modifying the file as we spoke, and I am having a second thought about which format is better and other member might have a similar thought.

 

Kuro

On Friday, October 29, 2021 at 3:56:59 PM UTC-7 krsk...@gmail.com wrote:

I gave up the effort of mechanical conversion by use of XLST. Too much complication.

Instead I ended up manually converting the first two release sections, leaving the rest of sections intact.

Before committing this, I'd like to show you how it looks on screen (Chrome on Mac):

 

 

Please compare this with how it looks using the other idea (neseted ul/li/ul/li instead of illegal ul/ul/li):

krsk...@gmail.com

unread,
Nov 28, 2021, 3:05:14 PM11/28/21
to okapi-devel
Revisiting my old topic, I attempted to write an XLST script to convert the changes.html (a version before the recent release) but find it as simple as I hoped.

I then tried a simpler approach of mechanically replacing all occurrences of "<ul>" with "<li><ul>" and "</ul>" with "</ul></li>",
then undo the replacements for the top level ul elements, then manually fixes the errors Intellij could spot.  That worked fine. 
The problem is that this approach can only generate the style that was voted out before, without using <h3> or <h4>. It looks like this:

Screen Shot 2021-11-28 at 11.40.32 AM.png

(The double bullet points on the first sub-bullet items bother me. I don't know why this wasn't shown in the screenshot I posted on 11/01.)

If everyone feels this is OK enough, I would like to apply the same operations on the latest changes.html in the dev branch and replace it.
Opinion? Thought?

Kuro

Denis A. Konovalyenko

unread,
Nov 28, 2021, 3:36:29 PM11/28/21
to okapi...@googlegroups.com

Hi Kuro,

Thank you for the heads-up! I am afraid the latest changes.html section in the dev branch had been already aligned with your initial proposal of using <h3> and <h4> tags... So, do I understand you correctly that your would like to make another sort of substitution which does not imply <h3> and <h4> tags? What if we just log new changes with the help of such tags and apply that another sort of conversion to earlier sections (releases) only, would it be a good enough way to go for you?

Denis

--
You received this message because you are subscribed to the Google Groups "okapi-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-devel...@googlegroups.com.

krsk...@gmail.com

unread,
Nov 28, 2021, 3:56:46 PM11/28/21
to okapi-devel
Denis,
Personally, I would favor the consistency, and avoid hybrid approach. But if the group like the hybrid format, I am fine with that too.

I can manually edit only the sections prior to the current release, or I can manually edit the current section to the format without h3/h4.

Reply all
Reply to author
Forward
0 new messages