-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Page edit: Add editing of tags #2078
Conversation
Signed-off-by: David Kesl <[email protected]> Signed-off-by: Davek145 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funny how small the world is 😂
I’ve just read your community post about your fork of my multiuser proxy (I will have a to take a closer look at it, I’m curious) — BTW I am really happy to have it forked by someone — and started to read the README and read something about a PR.
After abandoning this project (mostly because I did not really need it) I slowly started contributing to openHAB, and so I’m here now as a UI maintainer and I can review your PR:
For consistency I would prefer to have the tag input separate from the name, label etc. — the same as for rules etc.
Implementation:
openhab-webui/bundles/org.openhab.ui/web/src/pages/settings/rules/rule-edit.vue
Lines 153 to 157 in cf3b218
<f7-col v-if="(isEditable || rule.tags.length > 0) && (!createMode || !hasTemplate)"> | |
<f7-block-title>Tags</f7-block-title> | |
<semantics-picker v-if="isEditable" :item="rule" /> | |
<tag-input :item="rule" :disabled="!isEditable" /> | |
</f7-col> |
Next, the tags should be shown on the https://github.com/openhab/openhab-webui/blob/cf3b21857187fb288b2db521652d5d7b778bbfd7/bundles/org.openhab.ui/web/src/pages/settings/pages/pages-list.vue, for implementation see:
openhab-webui/bundles/org.openhab.ui/web/src/pages/settings/rules/rules-list.vue
Lines 104 to 108 in cf3b218
<div slot="footer"> | |
<f7-chip v-for="tag in rule.tags.filter((t) => t !== 'Script' && t !== 'Scene')" :key="tag" :text="tag" media-bg-color="blue" style="margin-right: 6px"> | |
<f7-icon slot="media" ios="f7:tag_fill" md="material:label" aurora="f7:tag_fill" /> | |
</f7-chip> | |
</div> |
Hi Florian. Yes, I have noticed you being now UI maintainer. And you are right, this PR is there because I realized the need when adjusting the multi-user proxy.
Yes, I understand. This is what I have started with. But it did not look good in the Page designer given the dynamic part below this template. That is why in the end I have choosen the accordion. But no problem to make ti separate again. I will just welcome your help in adjusting the vue template, so it works and looks good.
This is actually already there. All tags are showing in Pages list already now. Including those added by API or via my PR. |
Well, let’s see what looks better then.
Yeah, I did not expect that, but I’ve checked the code and it is indeed there. |
Thanks |
Signed-off-by: Florian Hotze <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
The accordion tag input looks way better than the separate one.
I think we can omit the "Non-Semantic", I have removed this.
@Davek145 I just wanted to merge this, however I have noted that you made your commits using a GitHub no-reply mail address. This is no problem in general, however does DCO require a mail address under which you are actually reachable. Can you please comment a sign-off line that is valid according to https://www.openhab.org/docs/developer/contributing.html#sign-your-work? |
@florian-h05, this commit is having Sign-off using valid email address as well. You are right that there is also the no-reply address next to it. I have fixed my github settings, so it will not be adding this no-reply sign-off when I make these small commits from webedit. What exactly do you mean by "Can you please comment a sign-off line"? As you made the change in the code I do not want to edit the original commit. Sorry, I have not used Github for more than a decade, so getting back into using it. |
Sorry, I have just checked your commit message and the first Sign Off from the first commit is fine. GitHub however selects the last sign off line when proposing a message for the merge, so I did not see that sign off. Everything is fine, thank you for the hint! |
Just to be clear, does this PR adds the ability to manage custom tags? |
Yes, what ever Tags you want to put in. Same as for Rules, Items ... |
Cool, I will test that during the weekend. |
Is it possible to have a screenshot showing how it looks like? |
This PR is not about having a page to edit the semantic model, it adds the ability to add and remove tags for pages. |
Sorry @lolodomo, I did not understand your question correctly. As said by @florian-h05, my PR is about non-semantic tags and ability to add / remove them for pages via UI. Similar to what is already possible for Rules and Items. |
Closes openhab#2077. This PR adds ability to add / change / remove Tags to Pages via MainUI. It is using existing tag-input.vue component similar as UI for Items and Rules. --------- Also-by: Florian Hotze <[email protected]> Signed-off-by: David Kesl <[email protected]> Signed-off-by: jgeorgi <[email protected]>
Closes openhab#2077. This PR adds ability to add / change / remove Tags to Pages via MainUI. It is using existing tag-input.vue component similar as UI for Items and Rules. --------- Also-by: Florian Hotze <[email protected]> Signed-off-by: David Kesl <[email protected]> Signed-off-by: jgeorgi <[email protected]>
Closes openhab#2077. This PR adds ability to add / change / remove Tags to Pages via MainUI. It is using existing tag-input.vue component similar as UI for Items and Rules. --------- Also-by: Florian Hotze <[email protected]> Signed-off-by: David Kesl <[email protected]>
Closes #2086 - Adds Non-semantic tags to Items list (e.g. /settings/items/) consistently with similar list of Rules / Scripts / Pages. - Extends `getItemTypeAndMetaLabel` with relatesTo part of Semantic classification and moves it to a mixin. - Fixes incorrect calculation of vue virtual box height on Items list. - Replaces custom tag input with accordion tag input (inspired by #2078) and show number of tags (inspired by #2083). - Moves the custom tag input to `item-form.vue`, so it is available also in Model view, when creating Item from Thing etc. Also-by: Florian Hotze <[email protected]> Signed-off-by: David Kesl <[email protected]>
- Refactor rule & scene settings into rule-general-settings Vue component and use this component on rule-edit, scene-edit pages and inside script-general-settings component. - Replace semantic tag picker & custom tag input with accordion tag input (inspired by #2078) and show number of tags. - Refactor shared code from rules & scenes into mixin (`rule-edit-mixin.js`). - Fix Scene tag is not hidden from tag input. - Show number of tags on page settings page, follow up for #2078. --------- Signed-off-by: Florian Hotze <[email protected]>
Closes #2077.
This PR adds ability to add / change / remove Tags to Pages via MainUI.
It is using existing tag-input.vue component similar as UI for Items and Rules.