-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Tabbed Windows #50
Comments
Yeah I think it would make sense in Mosaic. Will mull over implementation and API. Do you think tabs should be a global flag or only certain panes/views should be tabbable? |
I think being able to have certain panes/views be tabbable would be the expected behavior. But I see how this could affect the current header design and its consistency across the entire mosaic. So maybe it would be best as a global flag? Not sure. I'll look for more references of how other applications do it to see if someone figured out a better way. |
Hmm.. If Mosaic adds a My current thought is to just make it a global and when it is enabled Mosaic operates with interface MosaicTab<T> {
key: React.Key; // Need something for React to key off of
tabs: T[];
activeIndex: number;
}
type MosaicTabbedNode<T> = MosaicTabbedParent<T> | MosaicTab<T> | T;
interface MosaicTabbedParent<T extends MosaicKey> {
direction: MosaicDirection;
first: MosaicTabbedNode<T>;
second: MosaicTabbedNode<T>;
splitPercentage?: number;
}
type TabbedTileRenderer<T extends MosaicKey> = (t: T | MosaicTab<T>, path: MosaicBranch[]) => JSX.Element; Then the work needs to be done factor out reusable code from |
Any room to change the MosaicTabbedParent structure to something that enables other type of structures? Since the current one only supports two children it's a limit to expanding this and actually leads to a wrong behavior imo. Made a screencast of what I mean: If we're adding tabs for example we need a structure that allows different types of areas. Here's my suggestion (similar to golden layout): {
type: 'Row',
children: [
{
type: 'Column',
children: [
{
type: 'Window',
id: 'a',
},
{
type: 'Component',
id: 'b',
}
]
},
{
type: 'Stack',
children: [
{
type: 'Component',
id: 'c',
},
{
type: 'Component',
id: 'd',
}
]
}
]
} This seems to cover everything, let me know your thoughts. |
Yeah this might be a good opportunity to lump a fix to #31 in. |
Would very much like to see this implemented. Currently this is the only non-broken, Typescript supported, pure React (no JQuery dependency, ect.) alternative to something like Golden Layout, a library which has caused me nothing but problems. But tabs are a major missing feature for me. |
You could try https://www.npmjs.com/package/flexlayout-react for tabs |
do you know if any of the forks have attempted this? is there otherwise any update on how hard this would be to implement or whether its in the pipeline. like @Zentendo comment, this is an amazing library but the lack of tabs is a bit of blocker. |
Any agenda for this implementation? It would be a great feature |
I have tried this library (flexlayout) with BluePrint. You can see if it has any use to you: https://github.com/robertu/FlexLayout-bp3-demo |
I couldn't open it when running "yarn start" or "yarn run start". Showing:"error Command failed with exit code 127" |
I did it just second ago and got:
I'm using node v11.12.0 and yarn 1.13.0 |
When I checked the yarn version, it automatically installed a yarn, so I guess I might have to install that after I download the package. |
You can drag it and place it in a different part of the screen. The same way as in FlexLayout example. |
Sorry, my bad. I meant that it is so cool that you can do all those things ^_^ |
I won't have time to work on it personally - but accepting PRs! |
Really appreciated! It's really hard to find such a decent library those days |
Hey there! My team recently introduced Tabs on top of react-mosaic in our project Webviz. We didn't build it directly into our fork of react-mosaic, but I documented how we did it in a gist here if anybody wants to try something similar. Thanks @nomcopter for the great project! Maybe we'll work this change into react-mosaic fully one of these days 😛 |
It would be great to have tabbed windows similar in function to VSCode's.
Would this feature be in the project's desired scope?
The text was updated successfully, but these errors were encountered: