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

Added fix to hide or show the beetle icon on the feedback button #885

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/opc-feedback/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ import '@one-platform/opc-feedback/dist/opc-feedback';
| `app` | `Object` value is expected `{ name: 'one platform', url: '/' }` is the default fallback url for docs |
| `theme` | Refer [themes](https://github.com/1-Platform/op-components/tree/master/packages/opc-feedback/README.md#themes) section. |
| `target` | `String` value is expected, it is `_self` by default. Specifies where to open the linked document Url |
| `showBeetleIcon`| `Boolean` value is expected, it is true by default. Specifies to show or hide the parent beetle icon on the button |
| `beetleIcon` | `String` value is expected, it is `show` by default. Specifies to `show` or `hide` the parent beetle icon on the button |


### Default Template
Expand Down
4 changes: 2 additions & 2 deletions packages/opc-feedback/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/opc-feedback/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@one-platform/opc-feedback",
"version": "0.2.2-alpha",
"version": "0.2.3-alpha",
"description": "opc-feedback component follows the One Platform design system and can be used as a popup to collect feedback from the end-users.",
"scripts": {
"dev": "webpack serve",
Expand Down
6 changes: 4 additions & 2 deletions packages/opc-feedback/src/opc-feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class OpcFeedback extends LitElement {
@property({ type: String, attribute: 'spa' }) spa = undefined;
@property({ type: String, attribute: 'docs' }) docs = undefined;
@property({ type: String, attribute: 'target' }) target = undefined;
@property({ type: Boolean, attribute: 'showBeetleIcon' }) showBeetleIcon = true;
@property({ type: String, attribute: 'beetleIcon' }) beetleIcon = 'show';
@property({ reflect: true }) theme = 'red';
@property({ type: Object }) template = defaultTemplate;
@property({ type: Object }) app = defaultApplication;
Expand Down Expand Up @@ -165,12 +165,13 @@ export class OpcFeedback extends LitElement {
}

get renderIcon() {
if(this.beetleIcon !== "hide"){
const isModelOpen =
this._openFeedbackModal ||
this._openConfirmationModal ||
this._openInitialModal ||
this._openBugModal;
if (!isModelOpen && this.showBeetleIcon) {
if (!isModelOpen) {
return html`<img
src=${beetleIcon}
width="20px"
Expand All @@ -185,6 +186,7 @@ export class OpcFeedback extends LitElement {
class="pf-u-font-size-xl pf-u-mr-xs"
>
</ion-icon>`;
}
}

get getTarget(){
Expand Down
Loading