Vencord icon indicating copy to clipboard operation
Vencord copied to clipboard

new api: ExpressionPickerTabsAPI

Open programminglaboratorys opened this issue 1 year ago • 7 comments

Tablist API. let's you create panels for the expression picker an example of it would be the cookie clicker plugin.

it will be awesome to have some plugins moving to the expression picker, like SendTimestamps as adding a button only for timestamps is kinda annoying imo.

the API still needs some improvements. any feedback is welcome!

[!NOTE]
I should opened this PR request two weeks ago as I was thinking to add another feature which its called headless Panels the problem with it that it would ruin performance, so I scrapped the idea, originally it was a Panel without a tab button, its trigger only through code such a small thing to add

programminglaboratorys avatar May 12 '24 10:05 programminglaboratorys

I think I've mentioned this before, but "Tablist" is a confusing name for this API

Something like ExpressionPickerTabAPI or like that would be more clear to anyone building upon this

Sqaaakoi avatar May 16 '24 05:05 Sqaaakoi

I think I've mentioned this before, but "Tablist" is a confusing name for this API

Something like ExpressionPickerTabAPI or like that would be more clear to anyone building upon this

don't you think that a bit too long? I will see others opinions, there is probably better namings then TablistApi as you said.

programminglaboratorys avatar May 16 '24 18:05 programminglaboratorys

Naming convention would be to make it clear what your API does rather than care about the length of the name, so I agree that "TablistAPI" is really undescriptive

Something like "ExpressionsAPI" would be more appropriate, since your API involves adding new types of expressions to the picker.

lewisakura avatar May 17 '24 21:05 lewisakura

all done. awaiting review

programminglaboratorys avatar May 20 '24 17:05 programminglaboratorys

patch no longer works

Jesus-QC avatar Jan 21 '25 19:01 Jesus-QC

Recently we got shortcuts in the plugins definition to use most apis, this one should add those shortcuts too

look at renderChatBarButton for an example

I was not able to find renderChatBarButton, can you explain those new changes and what am I required to do?

programminglaboratorys avatar Jan 25 '25 08:01 programminglaboratorys

Recently we got shortcuts in the plugins definition to use most apis, this one should add those shortcuts too look at renderChatBarButton for an example

I was not able to find renderChatBarButton, can you explain those new changes and what am I required to do?

Instead of plugins calling the API in their start/stop methods, plugins should have a property with metadata about the tabs they will add

Take a look at #3028 where this was implemented for all the other APIs

Define a type for this in src/utils/types.ts and register/unregister it in src/plugins/index.ts using your existing functions

Sqaaakoi avatar Jan 25 '25 09:01 Sqaaakoi