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

Remove initReactRenderTracker and fix ReadMe #148

Closed
Closed
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
15 changes: 0 additions & 15 deletions Chat/src/app/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,3 @@ export const getBackgroundColor = (avatar: string): { backgroundColor: string }
};
}
};

/**
* Init React Render Tracker whenever it detects the query param 'rrt' is set to true.
*/
export const initReactRenderTracker = (): void => {
const urlParams = new URLSearchParams(window.location.search);
const isEnabled = urlParams.get('rrt');
if (isEnabled !== 'true') {
return;
}

const script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/npm/react-render-tracker';
document.head.appendChild(script);
};
4 changes: 0 additions & 4 deletions Chat/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ import './index.css';
import App from './app/App';
import { SwitchableFluentThemeProvider } from './app/theming/SwitchableFluentThemeProvider';

import { initReactRenderTracker } from './app/utils/utils';

const domNode = document.getElementById('root');
if (!domNode) {
throw new Error('Failed to find the root element');
}

initReactRenderTracker();

createRoot(domNode).render(
<React.StrictMode>
<SwitchableFluentThemeProvider scopeId="SampleChatApp">
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,22 @@ We appreciate your feedback and energy helping us improve our services. [If you'
## Local run

1. Set your connection string in `Server/appsettings.json`
1. Set your endpoint URL string in `Server/appsettings.json`
1. Set your adminUserId string in `Server/appsettings.json`
1. `npm run setup` from the root directory
1. `npm run start` from the root directory
2. Set your endpoint URL string in `Server/appsettings.json`
Copy link
Contributor

@emlynmac emlynmac May 21, 2024

Choose a reason for hiding this comment

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

These should be left as 1.
Markdown will adjust the render accordingly, but now we don't need to re-order if the instructions change

3. Set your adminUserId string in `Server/appsettings.json`
4. `npm run setup` from the root directory
5. `npm run start` from the root directory

## Publish to Azure

1. `npm run setup`
1. `npm run build`
1. `npm run package`
1. Use the [Azure extension](https://code.visualstudio.com/docs/azure/extensions) and deploy the `Chat/dist` directory to your app service
2. `npm run build`
3. `npm run package`
4. Use the [Azure extension](https://code.visualstudio.com/docs/azure/extensions) and deploy the `Chat/dist` directory to your app service

## Additional Reading

- [Azure Communication Services - UI Library](https://azure.github.io/communication-ui-library/) - To learn more about what the `@azure/communication-react` package offers.
- [Azure Communication Chat SDK](https://docs.microsoft.com/en-us/azure/communication-services/concepts/chat/sdk-features) - To learn more about the chat web sdk
- [Azure Communication Chat SDK](https://docs.microsoft.com/en-us/azure/communication-services/concepts/chat/sdk-features) - To learn more about the chat web sdk.
- [Teams Interop Meeting Chat Quickstart](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/ui-library-quickstart-teams-interop-meeting-chat) - To try out new beta features such as Rich Text Editor.
- [FluentUI](https://developer.microsoft.com/en-us/fluentui#/) - Microsoft powered UI library
- [React](https://reactjs.org/) - Library for building user interfaces