hasura / ddn-docs

Repository for the Hasura DDN version of docs
https://hasura.io/docs
2 stars 6 forks source link

Enhance data source component #583

Closed robertjdominguez closed 1 month ago

robertjdominguez commented 1 month ago

Description 📝

This PR refactors the DatabaseContentLoader component by extracting data sources, utility functions, and content loading logic into separate files to improve modularity and maintainability.

Additionally, the Selector component now minimizes when the user scrolls past a specified position, applying a minified class. EDIT: The component simply becomes sticky and stays with the user as they navigate.

Quick Links 🚀

Connect a data source (example)

Assertion Tests 🤖

robertjdominguez commented 1 month ago

Hey, @robertjdominguez :wave:

Thanks for this PR! Since you changed docs files, our automated Action assigned Rob as your reviewer :tada:

Before Rob looks over the changes, we ask you to take care of a couple of items:

The docs team aims to get all PRs reviewed within 48 hours of your team doing a review in the form of a content pass. Let Rob know the level of urgency on Slack :+1:

robertjdominguez commented 1 month ago

DX: Assertion Testing

✅ Diff

The PR introduces a modular approach by breaking up functionality into smaller, more focused components like 'contentLoader.tsx', 'dataSources.ts', 'selector.tsx', and 'utils.ts'. This enhances maintainability and readability. The abstraction of data sources and utility functions into their own files is specifically beneficial. Styles are updated to support a more responsive and dynamic layout. However, ensure that 'isMinified' state in the 'selector.tsx' is necessary for the design requirements.

✅ Integrated

The PR changes complement the existing documentation's usability by improving the user interaction model, particularly the data source selection process. The refactored code separates concerns, and the minified selector enhances user experience while scrolling. The integration effort also preserves the existing user preferences functionality. Ensure that any removed methods like 'savePreference' from 'index.tsx' are appropriately integrated into the new utils to maintain functionality. Additionally, validate that the new UI interacts smoothly with the different page states that exist within the documentation.

cloudflare-workers-and-pages[bot] commented 1 month ago

Deploying v3-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: fb3846d
Status: ✅  Deploy successful!
Preview URL: https://9feef5f7.v3-docs-eny.pages.dev
Branch Preview URL: https://rob-enhance-data-source-comp.v3-docs-eny.pages.dev

View logs

robertjdominguez commented 1 month ago

@rikinsk — take another look when you have some time, please 🙏