-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
OSDOCS-4073: Dynamic plug-in doc updates #53103
Conversation
2ed9b6e
to
62486fc
Compare
🤖 Updated build preview is available at: Build log: https://circleci.com/gh/ocpdocs-previewbot/openshift-docs/6763 |
b13c123
to
f1fa01f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @opayne1
<1> Update the name of your plug-in. | ||
<2> Update the version. | ||
<3> Update the display name for your plug-in. | ||
<4> Update the description with a synopsis about your plug-in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little odd we don't have them run the plugin first before making any edits. It would be good to show the hello world stuff working before anything else. I think this underscores how easy it is to get running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a additional resource link to it before the procedure to edit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that can work, but it still seems more natural to me to
- Clone the project
- Update the plugin metadata
- Run everything to see it working
This seems particularly true if you use yarn run start
since it will automatically update the UI when you make the changes below without having to restart your server. The browser will just refresh with your changes.
d619b7c
to
a5b5f2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @opayne1 !
<1> Update the name of your plug-in. | ||
<2> Update the version. | ||
<3> Update the display name for your plug-in. | ||
<4> Update the description with a synopsis about your plug-in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that can work, but it still seems more natural to me to
- Clone the project
- Update the plugin metadata
- Run everything to see it working
This seems particularly true if you use yarn run start
since it will automatically update the UI when you make the changes below without having to restart your server. The browser will just refresh with your changes.
@yapei could you please provide a QE review of this PR? Just some background, we were unable to link to the template repo the way we had before due to support reasons, so we have included it in an example as a workaround. Thank you! |
+ | ||
[source,terminal] | ||
---- | ||
yarn install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we clarify user should be in the local forked console-plugin-template folder to run all following commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure we are able to do this here. When Sam and I talked to support, the only way we are able to link to the template repo is with an example. I have added this page as an additional resource at the beginning of the "Adding a tab to the pods page" example. cc @spadgett
[discrete] | ||
== `Timestamp` | ||
|
||
A component to render timestamp. The timestamps are synchronized between invidual instances of the Timestamp component. The provided timestamp is formatted according to user locale. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/invidual/individual
namespace option is selected. It accepts the new namespace in the form | ||
of a string as its only argument. The active namespace is updated | ||
automatically when an option is selected, but additional logic can be | ||
applied via this function. When the namespace is changed, the namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/via/through
[discrete] | ||
== `ErrorBoundaryFallbackPage` | ||
|
||
Creates full page ErrorBoundaryFallbackPage component to display the "Oh no! Something went wrong." message along with the stack trace and other helpful debugging information. This is to be used inconjunction with an component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Create/Creates a
s/inconjunction/in conjunction
[discrete] | ||
== `useAccessReviewAllowed` | ||
|
||
@deprecated - Use useAccessReview from @console/dynamic-plugin-sdk instead.Hook that provides allowed status about user access to a given |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S/instead.Hook/instead. Hook
[discrete] | ||
== `useSafetyFirst` | ||
|
||
@deprecated - This hook is not related to console functionality.Hook that ensures a safe asynchronnous setting of React state in case a given |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S/functionality.Hook/functionality. Hook
S/React state/the React state ??
(facebook/react#14113)
== `ResourceYAMLEditor` | ||
|
||
A lazy loaded YAML editor for Kubernetes resources with hover help and completion. The component use the YAMLEditor and add on top of it more functionality likeresource update handling, alerts, save, cancel and reload buttons, accessibility and more. Unless `onSave` callback is provided, the resource update is automatically handled.It should be | ||
wrapped in a React.Suspense component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/React.Suspense/React.Suspense
or some markup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to leave all of these comments unresolved. Will be a good reference point for updating the API doc source in the openshift/console repo.
@opayne1 A whole bunch of nit-level suggestions for the most part. As we discussed, the edits to the reference modules will be addressed later. This table in the reference module should be fixed, if possible. It seems unusable. |
I opened https://issues.redhat.com/browse/OCPBUGS-5571 to track updating the API doc source in the openshift/console repo. |
|
||
.Procedure | ||
|
||
. Visit the link:https://github.com/openshift/console-plugin-template[`console-plugin-template`] repository containing a template for creating plug-ins in a new tab. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sferich888 FYI on the GH link based on a discussion we had a while ago to add it to an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alimobrem I assume support for plugin development falls in line with: https://access.redhat.com/solutions/5893251
If so if we can put a call out on the example page to this; we can approve the link to github.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note added. Thank you, Eric!
51540a3
to
16f01bd
Compare
/cherrypick enterprise-4.12 |
@opayne1: new pull request created: #54554 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This is a work in progress PR to reorg the dynamic plug-in documentation
Version(s):
4.12 (with plans to backport to 4.11)
Issue:
https://issues.redhat.com/browse/OSDOCS-4073
Link to docs preview:
https://53103--docspreview.netlify.app/openshift-enterprise/latest/web_console/dynamic-plug-in/dynamic-plug-in.html
QE review: