-
Notifications
You must be signed in to change notification settings - Fork 80
pre-pf5 cleanup #4863
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
Merged
Merged
pre-pf5 cleanup #4863
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Paths.namespaces is now used for both cases, and has build-dependent value, namespaceBreadcrumb uses IS_INSIGHTS
perl -i -npe 's/^\s*(\w+):\s*\1,$/$1,/' {test,src}/**/*.*
perl -i -npe 's/=\{true\}//g' src/**/*.*
perl -i -npe 's/(\w+)=\{false\}//g' src/**/*.* except: DataListCell isFilled defaults to true StatefulDropdown isPlain defaults to true Modal showClose defaults true No-Issue
perl -i -npe 's/extends React.Component/extends Component/' src/**/*.* grep '^import React\b' `git st | sed 1d | col2` | cut -d: -f1 | while read foo; do sed -i 's/import React /import React, {} /' "$foo" done sed -i 's/import React, {/& Component,/' `git st | sed 1d | col2` npm run prettier
perl -i -npe 's/\bReact\.ReactNode\b/ReactNode/g' src/**/*.* sed -i 's/import React /import React, {} /' `git st | sed 1d | col2` sed -i 's/import React, {/& ReactNode,/' `git st | sed 1d | col2` npm run prettier (and a manual fixup for double `ReactNode` in `src/components/render-plugin-doc/render-plugin-doc.tsx`)
perl -i -npe 's/\bReact\.FC\b/FunctionComponent/g' src/**/*.* perl -i -npe 's/\bReact\.FunctionComponent\b/FunctionComponent/g' src/**/*.* sed -i 's/import React /import React, {} /' `git st | sed 1d | col2` sed -i 's/import React, {/& FunctionComponent,/' `git st | sed 1d | col2` npm run prettier and a manual fixup in src/components/signing/signature-badge.tsx
perl -i -npe 's/\bReact\.ReactElement\b/ReactElement/g' src/**/*.* sed -i 's/import React /import React, {} /' `git st | sed 1d | col2` sed -i 's/import React, {/& ReactElement,/' `git st | sed 1d | col2` npm run prettier
perl -i -pe 's/useContext/useHubContext/g' src/**/*.* and a manual fixup in `src/loaders/app-context.ts`
for x in Ref createRef FormEvent MouseEvent useState RefObject ReactFragment HTMLProps CSSProperties HTMLAttributes Children ; do perl -i -npe 's/\bReact\.'$x'\b/'$x'/g' src/**/*.* sed -i 's/import React /import React, {} /' `git st | sed 1d | col2` sed -i 's/import React, {/& '$x',/' `git st | sed 1d | col2` npm run prettier git commit -a -m 'TODO '$x done
This was referenced Feb 20, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rebasing various cleanups from the previous pf5 attempt.. (#4141, #2095)
static contextType
NAMESPACE_TERM
- use modeDEPLOYMENT_MODE
- useIS_INSIGHTS
/IS_COMMUNITY
*WithNamespace
routes - use an optionalnamespace?
route paramwithContainerParamFix
- use acontainerName
functiontranslateLockedRole
- move constrant to function, avoidmsg
translateTask
- move to utilities, clean up namesprop={true}
andprop={false}
in favor ofprop
or nothing, unless the prop defaults to trueReact.Fragment
with short form or imported componentReact.(anything)
with just(anything)
, imported from reactFC
->FunctionComponent
useContext
->useHubContext
props.context