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

wip: create the documentation for the module 'forms' in flottform #54

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

Conversation

nidhal-labidi
Copy link
Contributor

Checklist

Reviewer

  • I've checked out the code and tested it myself.

Changes

Create a documentation for the module 'forms' in Flottform using TSDoc and Typedoc

Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
Copy link
Member

@Narigo Narigo left a comment

Choose a reason for hiding this comment

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

I think we don't really need to comment private methods. Can we gitignore the result of tsdoc and do that on merge to main or something?

Comment on lines 266 to 269
/**
* Stops polling for ICE candidates.
*/
private stopPollingForIceCandidates = async () => {
Copy link
Member

Choose a reason for hiding this comment

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

I think this is obvious. Since this is private, I don't think we need a comment for those

Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
@nidhal-labidi nidhal-labidi marked this pull request as ready for review September 23, 2024 15:19
@nidhal-labidi
Copy link
Contributor Author

The HTML containing the documentation can be created by running the script docs defined inside the package.json file, inside the module forms.

Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
Copy link
Member

@Narigo Narigo left a comment

Choose a reason for hiding this comment

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

Nice that this works! We need to get this into the build for the website or a subdomain at least then. We may also want to look into using custom styles to be able to have a look similar to the flottform.io page

Comment on lines 102 to 103
// @ts-ignore: Unused variable
id,
Copy link
Member

Choose a reason for hiding this comment

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

I think we should remove this completely

Suggested change
// @ts-ignore: Unused variable
id,

*
* @param {Object} params - Configuration options for setting up the Flottform component.
* @param {HTMLElement} params.flottformAnchorElement - The HTML element to which the Flottform component will be attached. It determines where the UI will be built on the page.
* @param {string} [params.id] - Optional ID for the UI used for File of Text element.
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be removed here. It's in the createFileInput and createTextInput already, so it's never used.

Suggested change
* @param {string} [params.id] - Optional ID for the UI used for File of Text element.

Comment on lines 241 to 242
// @ts-ignore: Unused variable
this.openPeerConnection.oniceconnectionstatechange = (e) => {
Copy link
Member

Choose a reason for hiding this comment

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

Should we read the iceConnectionState from e instead of using this.openPeerConnection.iceConnectionState?

Comment on lines 22 to 23
// @ts-ignore: Unused variable
const noop = () => {};
Copy link
Member

Choose a reason for hiding this comment

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

If we're not using this anymore, I think we should remove it 😅

Comment on lines 98 to 99
// @ts-ignore: Unused variable
export const createChannelQrCodeCss = (styles?: Styles) => `max-wigth: 100%;
Copy link
Member

Choose a reason for hiding this comment

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

What is max-wigth? Let's remove all the Unused variables if we're not using them. If we should have documentation for them, that documentation should be added somewhere already...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that whole file will be removed

Comment on lines +21 to 22
// @ts-ignore: Unused variable
private logger: Logger;
Copy link
Member

Choose a reason for hiding this comment

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

Should we add verbose log statements?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can delete this file since we don't actually use it anymore

Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
@nidhal-labidi
Copy link
Contributor Author

In the last commit (0090a4d) I've added a new library (https://www.npmjs.com/package/typedoc-material-theme) in order to style the docs. If you don't think that's a good idea we can remove it and just use the file forms/theme/docs-style.css to change the styles of the documentation.

Signed-off-by: nidhal-labidi <nidhal.labidi@compose.us>
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.

Create API docs for published APIs
3 participants