Lucene - Core
  1. Lucene - Core
  2. LUCENE-3904

Similarity javadocs look ugly if created with java7's javadoc

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.6, 4.0-ALPHA
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: general/javadocs
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The captions used to illustrate the formulas are tables here:
      in jdk 5/6 the table is centered nicely.

      But with java7's javadocs (I think due to some css styles changes?),
      the table is not centered but instead stretched.

      I think we just need to center this table with a different technique?

      Have a look at http://people.apache.org/~rmuir/java7-style-javadocs/org/apache/lucene/search/Similarity.html to see what I mean.

      NOTE: these javadocs are under TFIDFSimilarity.java in trunk.

      1. LUCENE-3904.patch
        9 kB
        Robert Muir
      2. Screen Shot 2012-03-23 at 12.38.21 PM.png
        235 kB
        Stefan Matheis (steffkes)
      3. patchScreenShot.jpg
        185 kB
        Robert Muir

        Activity

        Hide
        Robert Muir added a comment -

        patch against 3x... i plan to just port forward to trunk.

        The problem was that java7's default table style has width:100%, so we need to explicitly set it to auto for these captions.

        Additionally we need to ensure the text is actually centered for formulas where we have A/B.

        This changes nothing for java5/6 but fixes the issue for java7.

        Show
        Robert Muir added a comment - patch against 3x... i plan to just port forward to trunk. The problem was that java7's default table style has width:100%, so we need to explicitly set it to auto for these captions. Additionally we need to ensure the text is actually centered for formulas where we have A/B. This changes nothing for java5/6 but fixes the issue for java7.
        Hide
        Stefan Matheis (steffkes) added a comment -

        I just had quick look .. in stylesheet.css on line #345 is a declaration for

        .contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table {
            width:100%;
        }

        which expands the table. the fix would be to remove this, but i don't know if there are tables which requires this?

        In the attached Screenshot, i've modified the Source w/ Chrome Dev-Tools and set width: auto (see at the right bottom) and it's no longer expanded.

        Does this help?

        Show
        Stefan Matheis (steffkes) added a comment - I just had quick look .. in stylesheet.css on line #345 is a declaration for .contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { width:100%; } which expands the table. the fix would be to remove this, but i don't know if there are tables which requires this? In the attached Screenshot, i've modified the Source w/ Chrome Dev-Tools and set width: auto (see at the right bottom) and it's no longer expanded. Does this help?
        Hide
        Robert Muir added a comment -

        Stefan: that was exactly the problem!

        Additionally when we had a math formula with something like A/B

        (such as the 1/sumOfSquaredWeights^1/2), the text wasn't being centered, but that was more minor.

        Can you review my patch?

        Show
        Robert Muir added a comment - Stefan: that was exactly the problem! Additionally when we had a math formula with something like A/B (such as the 1/sumOfSquaredWeights^1/2), the text wasn't being centered, but that was more minor. Can you review my patch?
        Hide
        Stefan Matheis (steffkes) added a comment -

        Can you review my patch?

        +1 looks good

        Show
        Stefan Matheis (steffkes) added a comment - Can you review my patch? +1 looks good
        Hide
        Robert Muir added a comment -

        a screenshot of the java7 docs with the patch

        Show
        Robert Muir added a comment - a screenshot of the java7 docs with the patch
        Hide
        Robert Muir added a comment -

        Thanks Stefan

        Show
        Robert Muir added a comment - Thanks Stefan

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development