Skip to content
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

Inbox: Add Copy .things Definition (to clipboard) button #3021

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jimtng
Copy link
Contributor

@jimtng jimtng commented Jan 15, 2025

Purpose

This allows us to quickly create the Thing inside a .things file from the discovered Inbox items.

Note: I chose the text color blue here, because once #3020 is merged, the other blue button will go away, so visually, it will remain quite distinct from the other buttons for instant identification.

Background

This was discussed / requested by @seime here:
https://community.openhab.org/t/adjust-width-of-f7-dialog-include-clipboard-icon/154117

Screenshots

image

Once clicked, it shows a Toast message:

image

Output

The copied text looks like this:

Thing mqtt:homeassistant:broker2:d8bfc0da0776 "backporch-switch1" [ deviceId="d8bfc0da0776" ]

Copy link

relativeci bot commented Jan 15, 2025

#2719 Bundle Size — 10.98MiB (~+0.01%).

d039e1f(current) vs bf2f2ee main#2718(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  Change 1 change
                 Current
#2719
     Baseline
#2718
No change  Initial JS 1.9MiB 1.9MiB
No change  Initial CSS 577.21KiB 577.21KiB
Change  Cache Invalidation 18.04% 17.39%
No change  Chunks 227 227
No change  Assets 250 250
No change  Modules 2951 2951
No change  Duplicate Modules 154 154
No change  Duplicate Code 1.8% 1.8%
No change  Packages 98 98
No change  Duplicate Packages 2 2
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#2719
     Baseline
#2718
Regression  JS 9.19MiB (~+0.01%) 9.19MiB
No change  CSS 867.06KiB 867.06KiB
No change  Fonts 526.1KiB 526.1KiB
No change  Media 295.6KiB 295.6KiB
No change  IMG 140.74KiB 140.74KiB
No change  HTML 1.38KiB 1.38KiB
No change  Other 871B 871B

Bundle analysis reportBranch jimtng:inbox-copy-definitionProject dashboard


Generated by RelativeCIDocumentationReport issue

@lolodomo
Copy link
Contributor

How is generated this syntax? Kind of hardcoded I assume.
Remember that I am working on new REST API that will do that. My code is almost finished and I will create a PR very soon.

@lolodomo
Copy link
Contributor

@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI awaiting other PR Depends on another PR labels Jan 15, 2025
@jimtng
Copy link
Contributor Author

jimtng commented Jan 15, 2025

How is generated this syntax? Kind of hardcoded I assume.

Yes it's very simple and hard coded.

I've just seen your core PR, so we'll wait until that gets through.

@jimtng
Copy link
Contributor Author

jimtng commented Jan 15, 2025

My code is almost finished and I will create a PR very soon.

Is this a PR for webui? If so, should I close my PR?

@lolodomo
Copy link
Contributor

lolodomo commented Jan 15, 2025

Is this a PR for webui?

No, only new REST API. So core framework.
Main UI will have to call the new APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting other PR Depends on another PR enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants