InteropIO / wedbush-io-browser

0 stars 0 forks source link

Update Workspace Tab Icon and Title #5

Closed pedro-young-wedbush closed 1 month ago

pedro-young-wedbush commented 2 months ago

@bogdandinchev and @gganchev73

Could you please add codes to demo how to update the icon and title of a workspace including the default one?

image

gganchev73 commented 2 months ago

@pedro-young-wedbush @bogdandinchev I will look into this.

bogdandinchev commented 1 month ago

Hey @pedro-young-wedbush,

Sorry it took longer - we had a National holiday in Bulgaria on Friday (so we were both off then) and I was off yesterday as well.

Together with @gganchev73 we prepared an example which is an implemented custom WorkspaceTabComponent- it is built upon the default existing one, but you have to manually extend all the components as we did - https://github.com/InteropIO/wedbush-io-browser/commit/b2e48b515c4ce4686190c95f38942ce1a2386e81

To change the title you must make changes in the WorkspaceTabV2.tsx file. We believe the naming is fine though, but if you insist you can do something like const customTitle = title.startsWith('Untitled') ? 'New ' + title.split(' ')[1] : title

The icon you can change in OptionsButton.tsx (we've provided an example with a dummy image)

pedro-young-wedbush commented 1 month ago

@bogdandinchev and @gganchev73 - Thank you! I will review and adopt the changes.

pedro-young-wedbush commented 1 month ago

@bogdandinchev and @gganchev73 - Than you for the input.

We are able to customize the workspace tab title and icon:

image