Skip to content

NXT-15365: Replaced Gatsby with Astro Docs#272

Open
ion-andrusciac-lgp wants to merge 30 commits into
developfrom
feature/astro-2
Open

NXT-15365: Replaced Gatsby with Astro Docs#272
ion-andrusciac-lgp wants to merge 30 commits into
developfrom
feature/astro-2

Conversation

@ion-andrusciac-lgp

@ion-andrusciac-lgp ion-andrusciac-lgp commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Checklist

Issue Resolved / Feature Added

Replaced Gatsby with Astro Docs

Resolution

Additional Considerations

Until merge into develop, there will be some broken links in Edit on GitHub because it was set to refers on docs develop branch.

Links

NXT-15365

Comments

Enact-DCO-1.0-Signed-off-by: Ion Andrusciac ion.andrusciac@lgepartner.com

Comment thread sample-runner/README.md
the error boundary is triggered. Not perfect at all)
TODO: Add scripts for enact version selection here? Or, in docs?
This is a stand-alone sample runner that is intended to be embedded within an iframe.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

check what happened here. i don;t see clear differences. is it line ending?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it was changed from CLRF to LF

Comment thread src/components/Tooltip/Tooltip.jsx Outdated
import css from './Tooltip.module.css';

const Tooltip = ({children, title, ...rest}) => {
const optionalStyle = title.includes('Optional');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add a guard for falsey title


return (
<Tooltip
title={(title || linkTitle)?.split(/[.~]/).at(0)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this evaluates to undefined when both are falsy. Fix: const optionalStyle = title?.includes('Optional') (or default title = '').

Comment thread src/components/Page/utils.js Outdated
*/
const getMembers = (data) => {
const members = data.members.static.map((member) => member);
const memberName = data.members.static[0].memberof.split('/').pop();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should have a guard in case data.members.static is empty

Comment thread src/components/Page/utils.js Outdated
Comment on lines +49 to +50
const isComponent = member.tags.find((tag) => tag.title === 'ui');
const isHoC = member.tags.find((tag) => tag.title === 'hoc');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also need some guards

Comment thread src/components/Page/utils.js Outdated
returns: member.returns,

// Higher-Order Component Configuration
staticProperties: member.members.static[0]?.members.static || [],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add guard . member.members itself can be undefined

import css from './MemberFunction.module.css';

const MemberFunction = ({member, typeDefObjectFunction = false}) => {
const functionParams = member.params.map((value, index) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

member.params.map -add guard for undefined

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I Recommend defaulting these ((member.params|| [])

)
});

const functionReturns = member.returns.map((value) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

member.returns.map -add guard for undefined

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I Recommend defaulting these ((member.returns|| [])

Comment thread src/components/Sidebar/utils.js Outdated
}

const found = findGroupByPath(entry.entries, pathToMatch);
if (found) return Object.assign(found, {label: subfolder});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Object.assign(found, {label: subfolder}); permanently renames a group inside the global sidebar. Prefer to return {...found, label: subfolder}

Comment thread src/components/Sidebar/Sidebar.astro Outdated
} else if (isDeveloperGuidePage) {
sublist = filterSidebarEntries(sidebar, 'Developer Guide');

const parts = id.split('/').filter(Boolean).filter((id) => id !== 'docs');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the Developer Guide branch strips 'docs' from the path parts before computing isSubfolder; the Developer Tools branch doesn't. And filterSidebarBySubfolder re-splits the raw id regardless. If the two sections share a docs/… id shape, the subfolder depth check is off-by-one between them. Normalize both branches.

Comment thread scripts/make-runner.mjs Outdated
fast = args.fast,
enactCmd = args['enact-cmd'] || 'enact';

if (!enactCmd && !shell.which('enact')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

enactCmd = args['enact-cmd'] || 'enact' is always truthy, so if (!enactCmd && !shell.which('enact')) can never fire;
the "requires the enact cli" check is dead and won't warn when enact is missing.
Use if (!args['enact-cmd'] && !shell.which('enact'))

Comment thread src/components/Link/Link.jsx Outdated
if (!reference) return;
if (!title) linkTitle = reference;

const isExternal = reference.includes('http');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This treats any reference containing the substring "http" anywhere as external and returns it verbatim.
The see-link branch (line 38) already uses the correct startsWith('http://'|'https://') check

)}
<dd className={css.functionDetails + ' ' + noParamsClassName + ' ' + noReturnsClassName}>
<div className={css.paramsContainer}>
<h6 className={css.header + ' ' + css.params}>{paramsNumber} Param{paramsNumber > 1 && 's'}</h6>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we use !== 1 instead of >1 ?

Comment thread src/components/Code/Code.jsx Outdated

const Code = ({children}) => {
if (typeof children === 'string') {
hljs.registerLanguage('javascript', javascript);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we hoist this to the module top level?

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.

2 participants