question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tab groups and Tab blocks ** New Feature

See original GitHub issue

Description

What you guys think about the Tabs Feature?

!!! tabs "Basic use of tabs group"
    
    tab="Tab 1"
    This is a Text Tab
    
    tab="Tab 2"
    !!! info
        This is a  info Tab
    
    tab="Tab 3"
    This is a code tab.
    ```java
     public static void main(String a[]){
        //Hello world
     }
    ```

Expected behavior

image

see material tabs --> https://material.angular.io/components/tabs/overview

Generated Code:

<mat-tab-group>
  <mat-tab label="Tab 1"> Content 1 </mat-tab>
  <mat-tab label="Tab 2"> Content 2 </mat-tab>
  <mat-tab label="Tab 3"> Content 3 </mat-tab>
</mat-tab-group>

Actual behavior

Does not exist yet.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:37 (25 by maintainers)

github_iconTop GitHub Comments

2reactions
facelessusercommented, Jan 8, 2019

The admonition-like syntax should allow for proper nesting and arbitrary contents. Would it also be possible to combine that with (or better include into) details? I generally like the syntax. Reminds me of the ES6 spread operator which semantically somehow relates to tabs (multiple content blocks packed into a single structure). My only concern would be that “…” is probably too likely to be part of some body copy. However, as far as I understand it has to occur at the beginning of a line, correct?

I’m open to some proposals. If you have an idea, just post some fleshed out examples here. I’m not keen on ... either.

I don’t understand that one completely. What do you mean by tab caption? A text below the whole container?

I was referencing the opening post that used admontions as sort of a wrapper with a caption. A tab container would not have a native container title/caption. It would just be tabs. Like the code tabs do.

Wasn’t that problem already solved for tabbed code blocks?

Tabbed code blocks are like lists. They just group consecutive ones together. It was very simplistic in its implementation. People generally preface them with at least a sentence before (or wrap them in an admonition or something). No one has complained about the behavior yet, so I assume in real world cases, this has been sufficient for people. If people ever complain I’m sure I could add a tab break option:

``` tab="tab1"
content
```

``` tab="tab 2" tab_end=
content
```

``` tab="new tab group"
content
```

No one has ever asked for anything like this.

1reaction
squidfunkcommented, Jan 10, 2019

I would say we won’t need custom classes. There should be a specific class set like in the other extensions for styling. In my opinion we shouldn’t adhere too close to details and admonition as those are completely different use cases than tabs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use and disable Chrome's new tab groups and grid ...
To remove a tab from a group, simply access the arrow button on the bar and drag the tab to the bottom, as...
Read more >
Organize your tabs with tab groups in Google Chrome
This feature is available now in Chrome Beta. Tab groups in Chrome help you organize your tabs. Now, with a simple right click,...
Read more >
Share Tab Groups and collaborate in Safari on iPad
In Safari on iPad, share a Tab Group to collaborate with others. Add and remove people from the Tab Group at any time,...
Read more >
Google Adds Tab-Grouping Feature to Chrome for Android
So, this new grid-view for tabs on Chrome for Android now allows users to form tab groups by stacking multiple tab-pages into a...
Read more >
How to Create, Manage, and Disable Tab Groups in Chrome ...
To manage open tabs effectively, Google Chrome has introduced the Tab Groups feature which lets you group tabs into groups. By doing so,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found