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

feat: adding first version of embeddable docs #5513

Open
wants to merge 34 commits into
base: next
Choose a base branch
from

Conversation

davidsoderberg
Copy link
Contributor

@davidsoderberg davidsoderberg commented May 7, 2024

Copy link

linear bot commented May 7, 2024

Copy link

netlify bot commented May 7, 2024

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit 93fe387
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/664ca48147a90300088ec2c1
😎 Deploy Preview https://deploy-preview-5513--dev-web-novu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented May 7, 2024

Deploy Preview for novu-design ready!

Name Link
🔨 Latest commit 93fe387
🔍 Latest deploy log https://app.netlify.com/sites/novu-design/deploys/664ca481ee52c6000736d5f4
😎 Deploy Preview https://deploy-preview-5513--novu-design.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

apps/web/src/AppRoutes.tsx Outdated Show resolved Hide resolved
@davidsoderberg davidsoderberg marked this pull request as ready for review May 15, 2024 09:35
@davidsoderberg davidsoderberg requested a review from a team as a code owner May 15, 2024 09:35
@davidsoderberg
Copy link
Contributor Author

Here is the backend service for the docs as well https://github.com/novuhq/cloud-doc

Copy link
Contributor

@antonjoel82 antonjoel82 left a comment

Choose a reason for hiding this comment

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

Thank you for your hard work on this, David! The loom videos were super helpful for seeing the whole masterpiece come together and I think this feature will be very helpful for users.

I do have some large-scale feedback that I'm happy to discuss further; part of it may require input from Nik and Dima.

  1. As mentioned in AppLayout, I'm concerned that the context wrapping the whole app could have significant performance implications. I'd like to propose an alternative structure that avoids touching the *Page.tsx files. Given that all of our documentation is tied to a specific page, we should be able to leverage the ROUTES as a key for a look-up in a configuration file. This would allow us to correlate a route with a documentation path and any other static fields. Furthermore, it provides type-safety and centralizes the related content to minimize touchpoints. We could use a hook to match the current route to a config, and then render the button accordingly.
  2. I strongly propose that we do not put the documentation in the header nav. I don't believe it's a typical pattern, and that bar is already fairly crowded (and may get more so if we choose to add Org and Env switchers there). Instead, I'd propose a FAB (Floating Action Button). They offer more flexibility and extensibility, feel more directly related to the content on the existing page, and seem to match common practices more. I did a quick look, and saw that Linear is using one for the same purpose.
    Screenshot 2024-05-15 at 4 19 08 PM

Please let me know if you have any questions about these things or the other feedback in the PR, and again, nice work!

apps/web/src/components/docs/DocsButton.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/DocsButton.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/DocsButton.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/DocsButton.tsx Show resolved Hide resolved
apps/web/src/components/docs/DocsButton.tsx Outdated Show resolved Hide resolved
apps/web/src/components/providers/DocsProvider.tsx Outdated Show resolved Hide resolved
apps/web/src/components/providers/DocsProvider.tsx Outdated Show resolved Hide resolved
apps/web/src/components/providers/DocsProvider.tsx Outdated Show resolved Hide resolved
apps/web/src/components/providers/DocsProvider.tsx Outdated Show resolved Hide resolved
apps/web/src/components/layout/AppLayout.tsx Outdated Show resolved Hide resolved
@davidsoderberg
Copy link
Contributor Author

Thank you for your hard work on this, David! The loom videos were super helpful for seeing the whole masterpiece come together and I think this feature will be very helpful for users.

I do have some large-scale feedback that I'm happy to discuss further; part of it may require input from Nik and Dima.

  1. As mentioned in AppLayout, I'm concerned that the context wrapping the whole app could have significant performance implications. I'd like to propose an alternative structure that avoids touching the *Page.tsx files. Given that all of our documentation is tied to a specific page, we should be able to leverage the ROUTES as a key for a look-up in a configuration file. This would allow us to correlate a route with a documentation path and any other static fields. Furthermore, it provides type-safety and centralizes the related content to minimize touchpoints. We could use a hook to match the current route to a config, and then render the button accordingly.
  2. I strongly propose that we do not put the documentation in the header nav. I don't believe it's a typical pattern, and that bar is already fairly crowded (and may get more so if we choose to add Org and Env switchers there). Instead, I'd propose a FAB (Floating Action Button). They offer more flexibility and extensibility, feel more directly related to the content on the existing page, and seem to match common practices more. I did a quick look, and saw that Linear is using one for the same purpose.
    Screenshot 2024-05-15 at 4 19 08 PM

Please let me know if you have any questions about these things or the other feedback in the PR, and again, nice work!

I have now fixed according to your feedback on 1. Number 2 would I love to get @scopsy thoughts on :)

@scopsy
Copy link
Contributor

scopsy commented May 16, 2024

100% agree with @antonjoel82 on the top navigation bar point. I have already mentioned this earlier this week to nikolay here: https://www.figma.com/design/ybKRCB2ZO5DqICxjxzZGnW?node-id=701-74044#804551101

I would actually go further and say, that the inline documentation should be, well inline 😄 When it's located at the top navbar I would expect it will just open the global docs page for me, as the top navbar is the "global" scope for me personally.

Here are a couple of potentially solutions we can iterate over:

  • FAB Pattern (Joels suggestion) - similar to how Linear/Figma is handling it, and we can connect all relevant things there: Support, Docs, Changelog, Feedback, etc...
  • Have inline Icons close to their origin, for example: Near the "Workflows" title, this pattern can allow us having "multiple" inline docs withing specific screens and more complex areas like the workflow editor. (Resend did it nicely in their dashboard)

Putting this note assigned, I really like how the modal itself and the docs look like! 😍

@rgozdzialski
Copy link

@scopsy @antonjoel82 @davidsoderberg Since we're only testing the functionality --- although the FAB idea is cool and I agree in the long run it would give us more flexibility as a small context menu --- for version one, I'd go with the "icon next to the page title" approach that @scopsy suggested. Thanks!

@davidsoderberg
Copy link
Contributor Author

It is now moved to the page title instead 🥳

Screenshot 2024-05-16 at 09 05 38

Copy link
Contributor

@antonjoel82 antonjoel82 left a comment

Choose a reason for hiding this comment

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

Awesome work on all the changes, and thanks for walking me through them! There's still a bit of clean-up to be done to help with consistency and to avoid accruing more tech / design debt.

.source Outdated Show resolved Hide resolved
apps/web/src/components/docs/Docs.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/Docs.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/Docs.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/Docs.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/DocsModal.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/DocsModal.tsx Show resolved Hide resolved
apps/web/src/components/docs/VotingWidget.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/docs.const.ts Show resolved Hide resolved
<Alert
className={css({
borderRadius: '75',
backgroundColor: 'mauve.60.dark !important',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All !important I have added in latest commit was needed to affect style of their components

Copy link
Contributor

Choose a reason for hiding this comment

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

🤓 nitpick (non-blocking): While using the "new" base color tokens is better than using the legacy.* tokens, we should still be aiming to use semantic tokens as much as possible in application code so that we can better handle dark/light and in a semantic way.‏

apps/web/src/components/docs/Docs.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/docs.const.ts Show resolved Hide resolved
apps/web/src/components/docs/docs.const.ts Show resolved Hide resolved
pnpm-lock.yaml Outdated Show resolved Hide resolved
apps/web/src/components/docs/docs.const.ts Show resolved Hide resolved
Copy link
Contributor

@antonjoel82 antonjoel82 left a comment

Choose a reason for hiding this comment

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

Thanks for great improvements on this! My final recommendation would be that this should be behind a feature flag to make it easier to control. Fortunately, it should be fairly straight-forward since we only really have one "entry point."

apps/web/src/components/docs/Docs.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/Docs.tsx Outdated Show resolved Hide resolved
<Alert
className={css({
borderRadius: '75',
backgroundColor: 'mauve.60.dark !important',
Copy link
Contributor

Choose a reason for hiding this comment

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

🤓 nitpick (non-blocking): While using the "new" base color tokens is better than using the legacy.* tokens, we should still be aiming to use semantic tokens as much as possible in application code so that we can better handle dark/light and in a semantic way.‏

apps/web/src/components/docs/Docs.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/DocsButton.tsx Show resolved Hide resolved
apps/web/src/components/docs/DocsButton.tsx Outdated Show resolved Hide resolved
apps/web/src/components/docs/VotingWidget.tsx Outdated Show resolved Hide resolved
@antonjoel82 antonjoel82 requested a review from a team as a code owner May 17, 2024 23:41
@antonjoel82 antonjoel82 removed the request for review from a team May 17, 2024 23:41
@antonjoel82
Copy link
Contributor

@davidsoderberg I rebased your PR after merging the new Design System package and updated the imports for Panda so that everything should just work the same!

Copy link

github-actions bot commented May 21, 2024

Hey there and thank you for opening this pull request! 👋

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Your PR title is: feat: adding first version of embeddable docs
It should be something like: feat(scope): Add fancy new feature

Details:

No scope found in pull request title "feat: adding first version of embeddable docs". Scope must match one of: root, api, inbound-mail, web, webhook, widget, worker, ws, ee-auth, ee-billing, ee-billing-web, ee-echo-api, ee-echo-web, ee-echo-worker, ee-dal, ee-shared-services, ee-translation, ee-translation-web, automation, dal, design-system, embed, novui, shared, shared-web, testing, application-generic, novu, novu-labs, client, echo, headless, nest, node, notification-center, angular-workspace, notification-center-angular, notification-center-vue, providers, stateless.

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

Successfully merging this pull request may close these issues.

None yet

5 participants