albertocubeddu / extensionOS

Imagine a world where everyone can access powerful AI models—LLMs, generative image models, and speech recognition—directly in their web browser. Integrating AI into daily browsing will revolutionise online interactions, offering instant, intelligent assistance tailored to individual needs.
Other
74 stars 6 forks source link

Alternative Style for the Selection Menu #38

Open albertocubeddu opened 3 weeks ago

albertocubeddu commented 3 weeks ago

Is your feature request related to a problem? Please describe. The current Selection Menu appears too bulky and may not provide the optimal user experience.

Describe the solution you'd like It would be ideal to align the look and feel of the Selection Menu with the default Chrome context menu, enhancing user familiarity and ensuring a more seamless interaction.

Additional context Desired design: image You can see this design selecting some text and pressing the right-click. What we would like to achieve is to have this design: image for the selectionMenuItem

vs what is at the moment (when you just select a text): image

Scope of work

Modify the design on the SelectionMenu to be as similar as the google menu (right-click).

The menu uses shadcn command https://ui.shadcn.com/docs/components/command and its defined at: https://github.com/albertocubeddu/extensionOS/blob/f0ac08a49e2fc448e602cf2ba4612c5a1140eee8/contents/SelectionMenu.tsx#L173

Hopefully adding and adjusting the className in this file, we should be able to provide the same look and feel of the (right-click chrome menu).

ankitjha420 commented 3 weeks ago

Hi, here's what I understand about resolving this issue:

  1. Removed the emojis
  2. Fix font size and weights to match the chrome context menu
  3. Adjust the layout (vertical spacing) and add white border lines to separate menu items that are not related to each other

The menu item text itself should remain as is tho right?

albertocubeddu commented 3 weeks ago

Update the original ticket and adding:

Context

Starting from a default installation, the menu(s) must display the title defined by the final-user or loaded for first time reading the values at https://github.com/albertocubeddu/extensionOS/blob/f0ac08a49e2fc448e602cf2ba4612c5a1140eee8/background/init.ts#L30 and therefore displaying the emoji or any other character in the "title" property.

IContextConfigItems

This interface is used to populate both menus;

export interface IContextConfigItems {
   id: string; //Internal ID
   title?: string; //The display title
   contexts?: string[]; //Chrome Context e.g. page, select, etc.
   prompt?: string; //The actionable prompt (e.g. fix this text: )
   functionType?: string; //The functionality when used (copy to clipboard, etc)
   type?: string; //Used for **separator**
   extraArgs?: any; //Extensible for the future
}

Customisable menu(s)

The user has the ability to customise the Display Name, and therefore we must display the same "characters" he/she will save. image

Menus

Extension | OS works with one configuration interface for both menus ( ) defined and loaded at: https://github.com/albertocubeddu/extensionOS/blob/f0ac08a49e2fc448e602cf2ba4612c5a1140eee8/background/init.ts#L24

Chrome Default Menu (Right Click)

image loaded at: https://github.com/albertocubeddu/extensionOS/blob/f0ac08a49e2fc448e602cf2ba4612c5a1140eee8/background/index.ts#L46

Selection Menu (the one we want to change)

Created at: https://github.com/albertocubeddu/extensionOS/blob/main/contents/SelectionMenu.tsx

albertocubeddu commented 3 weeks ago

Hi, here's what I understand about resolving this issue:

  1. Removed the emojis
  2. Fix font size and weights to match the chrome context menu
  3. Adjust the layout (vertical spacing) and add white border lines to separate menu items that are not related to each other

The menu item text itself should remain as is tho right?

  1. Emoji are defined by the init.ts and the user, therefore we must display them. As the user can add/remove them when is configuring the application.
  2. Correct
  3. Spot on, the selectionMenu is already showing a separator, however the design is so bad, that is impossible to see. if you hover the mouse in this area you will see:

image

ankitjha420 commented 3 weeks ago

Thank you the context info is really helpful. Can I give this a shot? I'm new to open source

albertocubeddu commented 3 weeks ago

I would glad if you can help me out :) Fork the repo, create a new branch, therefore if we both need to modify it it's easier. If you have any question, i'm happy to help

mdabir1203 commented 1 week ago

Is the above done ?

albertocubeddu commented 1 week ago

I haven't received any PR, however Ankit may have started working on it

On Sun, 1 Sept 2024, 8:56 am uknowWho, @.***> wrote:

Is the above done ?

— Reply to this email directly, view it on GitHub https://github.com/albertocubeddu/extensionOS/issues/38#issuecomment-2323351012, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACODEJO3OYHH2RGPBQJHRY3ZUMMKTAVCNFSM6AAAAABM5JT4GGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTGM2TCMBRGI . You are receiving this because you authored the thread.Message ID: @.***>