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

Add PC Widget Docs #157

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Add PC Widget Docs #157

wants to merge 14 commits into from

Conversation

saga-hs
Copy link
Collaborator

@saga-hs saga-hs commented Dec 24, 2024

No description provided.

+ Add PC Widget - Unity in the sidebar, navbar, and home sections.
+ Add environment setup page for PC Widget Unity.
+ Add build project and configuration docs for PC Widget Unity
+ Add available apis and integration docs for PC Widget Unity
Copy link

vercel bot commented Dec 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
helpshift-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 17, 2025 10:53am

docs/pc-widget-unity/available-apis.mdx Outdated Show resolved Hide resolved
docs/pc-widget-unity/available-apis.mdx Outdated Show resolved Hide resolved
docs/pc-widget-unity/available-apis.mdx Outdated Show resolved Hide resolved
- This is typically invoked during the on-click action of a clickable element (e.g., a button).
- `Important:` Ensure that HelpShift.Initialize() has been called earlier in the game flow before invoking this method; otherwise, the widget will not function properly.

**Example Usage:**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specific language for snippet for formatting.

Copy link
Collaborator Author

@saga-hs saga-hs Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not possible when we are using the <code> component

docs/pc-widget-unity/available-apis.mdx Outdated Show resolved Hide resolved
docs/pc-widget-unity/configuration.mdx Outdated Show resolved Hide resolved
docs/pc-widget-unity/configuration.mdx Outdated Show resolved Hide resolved
docs/pc-widget-unity/configuration.mdx Outdated Show resolved Hide resolved
docs/pc-widget-unity/environment-setup.mdx Outdated Show resolved Hide resolved
docs/pc-widget-unity/integration.mdx Outdated Show resolved Hide resolved
docs/pc-widget-unity/available-apis.mdx Outdated Show resolved Hide resolved
```
Helpshift.Hide()
```
### HelpShift.CleanUp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make Helpshift consistent everywhere

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to start API names with capital letters? Or should it be Helpshift.show instead of `Helpshift.Show

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helpshift made consistent

PC Widget C sharp API are like this Helpshift.Show


**Description:**

Handles events sent from the HelpShift widget to Unity. This method is typically called inside Unity's Update() method.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to mention Helpshift Widget in the docs because it is internal to us and the customers/developers does need to know about it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as we are using Helpshift web widget in PC widget

<Image src="/static/books/pc-widget-unity/publish-selection.png" width="half" />


Configure the Publish option to produce the files in a local folder.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

publish option & Use the below publish profile settings?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but this is for internal use.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant the lowercasing of the words 😅

docs/pc-widget-unity/configuration.mdx Outdated Show resolved Hide resolved
PlatformId = "mydomain_platform_123",
AppId = "3",
WidgetType = "helpcenter_and_webchat",
////////////////////////////////////
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the fields like Domain, PlatformId be in lowercase?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is because of the C sharp conventions

docs/pc-widget-unity/integration.mdx Outdated Show resolved Hide resolved
+ Change the layout of helpshift api docs to match other docs.
<tr>
<td>Helpshift.Initialize</td>
<td>
Initializes the Helpshift widget and runs it in the background, enabling it to listen for notifications.<br/><br/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change Helpshift widget -> Helpshift Widget everywhere

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also check with product if we want to have PC widget as PC Widget?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going with Helpshift Pc Widget

} from "@site/src/components/forDocs";


A configuration object has to be created, which should be passed to the `initialize` API.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrase this line. Ref to Web Widget page.

A configuration object has to be created, which should be passed to the `initialize` API.
Below are the configuration options that we have**.**

# Mandatory Configuration
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this heading.

This could be labelled as base config. All configs should be at same level.


```

1. Replace `YOUR_DOMAIN` with your Helpshift domain.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same description as point #2. Instead of giving text descriptions, use screenshot.

For example, _happyapps_ if your dashboard sits at _happyapps.helpshift.com_.
2. Replace `YOUR_PLATFORM_ID` with details found at `Settings` > `SDKs (for Developers)`.
<Image src="/static/books/web-chat/wc-embed-sdk.png" width="full" />
3. Replace `YOUR_APP_ID` with details found at `Settings` > `Your App (eg. Helpshift Demo App)` > `Publish ID`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Settings > Your App (eg. Helpshift Demo App) > Publish ID

This part is not code snipped, avoid code formatting. Use em or bold if needed.

3. Replace `YOUR_APP_ID` with details found at `Settings` > `Your App (eg. Helpshift Demo App)` > `Publish ID`.
<Image src="/static/books/hs-widget/app-id.jpg" width="full" />

Above mentioned configuration like `Domain`, `PlatformId`, `AppId` are mandatory for initializing the Helpshift PC Widget. For additional configurations refer below.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be part of top level descriptions.


## Helpshift.Initialize

**Description:**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove colon. Also use h4 or h5, better spacing as headers.

| Parameter | Type | Description |
|-------------------|--------|------------------------------------------------------------------------------------------|
| `path` | string | The base path to the application's streaming assets, e.g., `Application.streamingAssetsPath`. |
| `helpshiftConfig` | object | A configuration object for the widget. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type here should be customer right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added HelpshiftConfig as a type.

This page provides a list of APIs available for the Helpshift PC widget along with their descriptions, parameters, and usage examples.
</Intro>

## Helpshift.Initialize
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initialize Helpshift Widget

similar format at other places.


<Admonition type="info" title="Note">

In order to ensure a smooth migration for existing users, the default language is set to English (`en`) i.e. if you don't set the `Language` option in the `HelpshiftConfig` object, Helpshift PC Widget will use English as the language. You can set it to `browserDefault` in case you want your Helpshift PC Widget experience to be in the browser's language.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This not is confusing. In the context of a web widget browser makes sense, but in PC widget it does not. We need to discuss if we even need to support this.

Step,
} from "@site/src/components/forDocs";

# Users {#users}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

userAuthToken part is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants