-
Notifications
You must be signed in to change notification settings - Fork 114
Add DrawsTabs trait with tests #143
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
base: main
Are you sure you want to change the base?
Conversation
|
Not sure we have the bandwidth to take this on at the moment 😅 I wonder if there is a world where Prompts could maybe support stuff like this via packages / extensions? |
|
@taylorotwell technically with my three other PRs that you've merged this week, I could now package my trait and prompt separately and it would be compatible. My ultimate goal here is to get this prompt of mine into the laravel installer so that we can provide some detailed context on our various front end stack options to newcomers directly within the installer. If I were to package my prompt up instead, would you be okay with me adding a new dependency on it in the installer? I've tried to limit the maintenance burden as much as possible by including plenty of tests and documentation, but I understand the apprehension. |
|
I've released this trait (along with the prompt that it enables) in my Community Prompts Package so that others can use it. I'll leave this PR open though until it's either merged or closed by you folks since I'd still love it to become first party and available to everyone. |
b72a897 to
5fa5efc
Compare

This PR adds a trait that can be used in the same way as the
DrawsScrollbarsorDrawsBoxestraits to draw a series of tabs in a prompt. The selected index will be highlighted, and the tabs scroll horizontally automatically to make sure that the highlighted tab is always fully visible.Example Usage:
Example Output:
╭─────╮ │ One │ Two Three Four Five Six ┴─────┴─────────────────────────────────────────────────────This could potentially be used at the top of a
boxfor tabbed navigation in order to give extra context. Here's an example of this trait being used for exactly that purpose in a component I've built:TabbedScrollableSelectPrompt-edit.mov