[ 
https://issues.apache.org/jira/browse/SOLR-11584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16250016#comment-16250016
 ] 

Hoss Man commented on SOLR-11584:
---------------------------------

bq. It's a Button instead of a Nav: ...

I'm sorry, i explained myself really poorly -- I had already ruled out the 
"Collapse" button from my thinking and didn't even realize it was _also_ in the 
same "daemon" section i was drawing attention to.

The pill/tab oddness i was refering to in your original patch was this sentence:

bq. Push streaming can also be used for continuous background aggregation 
scenarios where aggregates are rolled up in the background at intervals and 
pushed to other Solr collections. Another use case is continuous background 
machine learning model optimization, where the optimized model is pushed to 
another Solr collection where it can be integrated into queries.

...which existed _inside_ a {{.tab-content}} block, but is not part of any 
individual {{.tab-pane}} blocks -- it was a free floating paragraph in betwen 
the {{#daemonSyntax}} tab-pane and the {{#daemoncommands}} tab-pane.  because 
of how Bootstrap shows/hides tab-panes, the result was that as you click back 
and forth on the respective pills, that text stayed on the screen the whole 
time, but jumped up/down on the screen from being "above" or "below" the 
(currently visible) tab-pane (below when "Syntax" was showing, above when 
"Commands" was showing)

This type of "bouncing" paragraph content is what I was thinking was probably 
unintentional when you added the tabs, and probably a bad idea for readability 
moving forward: All content should either come before the set of tabs, or be 
inside a single tab, or come after the set of tabs -- not move around as the 
visible tab changes.  That's what i added a bit of validation for.

(In my patch, i moved that legit sentence up above the {{.dynamic-tabs}} block 
in the "daemon" section -- so it's part of the introduction before the 
syntax/command tabs -- and added a more blatantly obvious {{nocommit: some text 
that exists inside of a '.dynamic-tabs' but is not inside of any '.tab-pane'}} 
paragraph to demonstrate the validation i added that had been inspired by that 
para.  If you apply my patch and search for that nocommit example you'll see 
what i mean as you toggle tabs, or you apply your original patch and search for 
the above mentioned sentence you can see the same jumping oddness)



> Ref Guide: support Bootstrap components like tabs and pills
> -----------------------------------------------------------
>
>                 Key: SOLR-11584
>                 URL: https://issues.apache.org/jira/browse/SOLR-11584
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: documentation
>            Reporter: Cassandra Targett
>            Assignee: Cassandra Targett
>            Priority: Minor
>             Fix For: 7.2
>
>         Attachments: SOLR-11584.patch, SOLR-11584_customjs.patch, 
> SOLR-11584_customjs.patch, refguide-tabs.png, tabbed_api_output_example.png
>
>
> The theme I initially copied as the basis for the new Ref Guide included a 
> Bootstrap integration, which has the potential to provide us with a number of 
> options, such as organizing some content on a page into tabs (to present the 
> same information in multiple ways - such as Windows vs Unix commands, or 
> hand-editing schema.xml/managed-schema vs Schema API examples). 
> However, the way AsciiDoctor content is inserted into a Jekyll template made 
> it difficult to know how to use some of Bootstrap's features. Particularly 
> since we have to make sure whatever we put into the content comes out right 
> in the PDF.
> I had a bit of a breakthrough on this, and feel confident we can make 
> straightforward instructions for anyone who might want to add this feature to 
> their content. A patch will follow shortly with more details but the summary 
> is:
> * Add an AsciiDoctor passthrough block that includes the Bootstrap HTML code 
> to create the tabs.
> ** This has an {{ifdef::backend-html5[]}} rule on it, so it will only be used 
> if the output format is HTML. The PDF will ignore this section entirely.
> * Use AsciiDoctor's "role" support to name the proper class names, which 
> AsciiDoctor will convert into the right {{<div>}} elements in the HTML.
> ** These will take multiple class names and a section ID, which is perfect 
> for our needs.
> ** One caveat is the divs need to be properly nested, and must be defined on 
> blocks so all the content is inserted into the tab boxes appropriately. This 
> gets a little complicated because you can't nest blocks of the same type 
> (yet), but I found two block types we aren't using otherwise.
> ** The PDF similarly ignores these classes and IDs because it doesn't know 
> what to do with custom classes (but in the future these may be supported and 
> we could define these in a special way if we want).
> * Modify some of the CSS to display the way we want since AsciiDoctor inserts 
> some of its own classes between the defined classes and the inheritance needs 
> to be set up right. Also the default styling for the blocks needs to be 
> changed so it doesn't look strange.
> I'll include a patch with a sample file that has this working, plus detailed 
> instructions in the metadocs. In the meantime, I've attached a screenshot 
> that shows a small snippet from my testing. 
> While the focus here is using tabs & pills, we will be able to use the same 
> principles to support collapsing sections if that's preferred for 
> presentation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to