radio4000 / components

web-components to build the r4 interfaces, uses the sdk
https://components.radio4000.com/
1 stars 0 forks source link

Feat/command menu #93

Closed oskarrough closed 7 months ago

oskarrough commented 1 year ago

I copy/pasted https://github.com/oskarrough/command-menu.

The component has a generateCommands(config, store) function which runs on render. This allows us to inject commands dynamically based on the config and store.

The command menu uses shadow dom styling, and reads css variables from r4-app.

92 should be done first.

netlify[bot] commented 1 year ago

Deploy Preview for radio4000-components ready!

Name Link
Latest commit 69dfe21581f2832c1deebdd320fe2e7e9146cfa7
Latest deploy log https://app.netlify.com/sites/radio4000-components/deploys/64b01cec925899000869876e
Deploy Preview https://deploy-preview-93--radio4000-components.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

oskarrough commented 1 year ago

I tried wrapping it with <r4-dialog> to get the backdrop and close-on-outside-click, but couldn't make it work.

oskarrough commented 1 year ago

Too much logic inside command menu to reuse r4-dialog I guess. I added a backdrop and dialog element manually.

oskarrough commented 1 year ago

Ideally the command menu from https://github.com/oskarrough/command-menu would turn in to a package. But I don't want to bother with NPM until it's useful for others, so keeping it a copy inside r4 for now.