Skip to content

Commit

Permalink
Added a property named showBeetleIcon t hide or show the beetle icon …
Browse files Browse the repository at this point in the history
…on the feedback button (#884)

* removed the scenario where beegleicon was only shown only for blue theme.

added id to beetleicon also

* version bump

* updated package.lock

* showBeetleIcon to hide or show the beetle icon

---------

Co-authored-by: Shamsuddin Shamsuddin <[email protected]>
  • Loading branch information
yamalameyooooo and sshamsudRH authored Jun 11, 2024
1 parent 16985d4 commit d808506
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
18 changes: 10 additions & 8 deletions packages/opc-feedback/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,16 @@ import '@one-platform/opc-feedback/dist/opc-feedback';

## Properties

| Name | value |
| -------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `spa` | `String` value is expected, **View Feedback** link is hidden by default. |
| `docs` | `String` value is expected, it is `undefined` by default. |
| `summaryLimit` | `Number` value is expected, it is Infinite by default. |
| `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 |
| Name | value |
| --------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `spa` | `String` value is expected, **View Feedback** link is hidden by default. |
| `docs` | `String` value is expected, it is `undefined` by default. |
| `summaryLimit` | `Number` value is expected, it is Infinite by default. |
| `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 |


### 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.1-alpha",
"version": "0.2.2-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
3 changes: 2 additions & 1 deletion packages/opc-feedback/src/opc-feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +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({ reflect: true }) theme = 'red';
@property({ type: Object }) template = defaultTemplate;
@property({ type: Object }) app = defaultApplication;
Expand Down Expand Up @@ -169,7 +170,7 @@ export class OpcFeedback extends LitElement {
this._openConfirmationModal ||
this._openInitialModal ||
this._openBugModal;
if (!isModelOpen) {
if (!isModelOpen && this.showBeetleIcon) {
return html`<img
src=${beetleIcon}
width="20px"
Expand Down

0 comments on commit d808506

Please sign in to comment.