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

docs(samples): add API reference and Kitchen Sink for Presence #3551

Merged
merged 9 commits into from
Apr 23, 2024

Conversation

sreenara
Copy link
Contributor

@sreenara sreenara commented Apr 20, 2024

COMPLETES #SPARK-492000

This pull request addresses

  1. webex.github.io/webex-js-sdk/ main page should now feature a Presence link as well. There should also be an API reference link for the Presence API so developers can refer to this.
  2. Presence kitchen sink page should allow a developer to input an access token like the remaining pages and initialize the plugin
  3. Once the plugin is initialized, a developer should be able to do these functions:
  • Subscribe to another user's presence and receive updates. Updates can be displayed in a text box
  • Set presence for the user

by making the following changes

  • Created a new page in the docs/samples folder for presence which fulfills the requirements for the Jira.
  • Added typedoc package to @webex/plugin-presence and modified tsconfig.json to generate the API reference documents for presence.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  1. Initialize webex token in the new page
  2. Get presence status for the user that's logged in
  3. Get presence status for another user
  4. Set presence for the user that's logged in
  5. Subscribe to presence notifications from another user
  6. Unsubscribe from presence notifications from another user
  7. Check the API reference for Presence and ensure the details mentioned are correct

API Reference walkthrough:
https://github.com/webex/webex-js-sdk/assets/131740035/a17bf88e-236d-4e9c-9735-128614b21b2b

Kitchen sink walkthrough:
https://github.com/webex/webex-js-sdk/assets/131740035/c724c5e8-250d-46fe-acd9-0fcce144be1c - Part 1
https://github.com/webex/webex-js-sdk/assets/131740035/135dc844-bc12-4d0a-8943-b30ed1828074 - Part 2

Setting presence status for self:
https://github.com/webex/webex-js-sdk/assets/131740035/09b2d238-189d-4ac7-8ea4-eef8fa4a8d02

I certified that

  • I have read and followed contributing guidelines

  • I discussed changes with code owners prior to submitting this pull request

  • I have not skipped any automated checks

  • All existing and new tests passed

  • I have updated the documentation accordingly


Make sure to have followed the contributing guidelines before submitting.

@sreenara sreenara added the validated If the pull request is validated for automation. label Apr 20, 2024
@sreenara sreenara requested a review from a team as a code owner April 20, 2024 18:03
@sreenara sreenara changed the title docs(samples): add new docs for the presence kitchen sink docs(samples): add API reference and Kitchen Sink for Presence Apr 21, 2024
docs/samples/browser-plugin-presence/app.js Outdated Show resolved Hide resolved
docs/samples/browser-plugin-presence/index.html Outdated Show resolved Hide resolved
padding: 0;
background-color: #eee;
font-family: sans-serif;
font-size: 15px;
Copy link
Contributor

Choose a reason for hiding this comment

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

By default we should use 16px

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

font-size: 15px;
}

video {
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't have any video element so, we can remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

button.btn--green:disabled, input[type="button"].btn--green:disabled{
opacity: .5;
}
button.btn--red, input[type="button"].btn--red {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a new line between all the css selectors (individual or composite)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -31,7 +31,8 @@
"@webex/test-helper-test-users": "workspace:*",
"eslint": "^8.24.0",
"prettier": "^2.7.1",
"sinon": "^9.2.4"
"sinon": "^9.2.4",
Copy link
Contributor

Choose a reason for hiding this comment

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

We should remove the caret from existing dependencies as well.

cc- @Shreyas281299

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made the versions constant

margin-left: 1rem;
}

.ServiceData{
Copy link
Contributor

Choose a reason for hiding this comment

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

class name should be kebab-case

Copy link
Contributor Author

@sreenara sreenara Apr 23, 2024

Choose a reason for hiding this comment

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

Removed this class as it's not needed

border-bottom: 0.125rem solid #009879;
}

#transfer-options {
Copy link
Contributor

Choose a reason for hiding this comment

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

If possible, let's avoid id selector

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this class as it's not needed

@sreenara sreenara requested a review from a team as a code owner April 23, 2024 05:08
packages/@webex/plugin-presence/src/interface.ts Outdated Show resolved Hide resolved
docs/samples/browser-plugin-presence/index.html Outdated Show resolved Hide resolved
docs/samples/browser-plugin-presence/index.html Outdated Show resolved Hide resolved
docs/samples/browser-plugin-presence/index.html Outdated Show resolved Hide resolved
docs/samples/browser-plugin-presence/index.html Outdated Show resolved Hide resolved
docs/samples/browser-plugin-presence/app.js Outdated Show resolved Hide resolved
docs/samples/browser-plugin-presence/app.js Show resolved Hide resolved
Copy link
Contributor

@rarajes2 rarajes2 left a comment

Choose a reason for hiding this comment

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

LGTM


.styled-table th,
.styled-table td {
padding: 1.25rem 1.25rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

this is still same

@sreenara sreenara merged commit d5e0804 into webex:next Apr 23, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated If the pull request is validated for automation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants