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

SDK - add plain yaml editor #11840

Merged
merged 1 commit into from Jul 29, 2022

Conversation

upalatucci
Copy link
Contributor

Hei guys!!

for this ticket i need to expose the YAMLEditor.

The ResourceYAMLEditor has a lot of other things that I don't need like toolbar, buttons, alerts when something changes, and so on.
ResourceYAMLEditor use YAMLEditor so there will be no issue.

Why don't you just add the monaco-editor or patternly react editor into the plugins repo?
Because the editor ( in particular using YAML language) needs some additional configurations using yaml-language-server and monaco-editor-webpack-plugins that maybe it's not great to have in the plugin repo.

WDYT? @vojtechszocs

@openshift-ci openshift-ci bot added the component/sdk Related to console-plugin-sdk label Jul 15, 2022
@upalatucci
Copy link
Contributor Author

/retest

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

Hi, I'm OK exposing this component, but we need to make sure it's lazy-loaded and add more complete documentation. Assume the person reading this is a developer who only has the doc and can't inspect the code to see how the props are used.

@openshift-ci openshift-ci bot added component/core Related to console core functionality component/shared Related to console-shared labels Jul 18, 2022
@upalatucci
Copy link
Contributor Author

Hei @spadgett thanks for your feedback.
I've pushed now an update following your review.
Let me know if there is anything else I can do better :-)

@upalatucci
Copy link
Contributor Author

/retest

1 similar comment
@upalatucci
Copy link
Contributor Author

/retest

@spadgett
Copy link
Member

Hey @upalatucci you'll need to add the updated API docs to your commit.

dynamic plugin sdk docs are not up to date. Run 'yarn generate-plugin-sdk-docs' then commit changes.

@upalatucci upalatucci force-pushed the add-yaml-editor branch 2 times, most recently from 406dd65 to 3d95763 Compare July 20, 2022 13:45
@vojtechszocs
Copy link
Contributor

/lgtm

@spadgett
Copy link
Member

/retest

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 20, 2022
@upalatucci
Copy link
Contributor Author

/retest

1 similar comment
@upalatucci
Copy link
Contributor Author

/retest

@spadgett
Copy link
Member

/assign @yapei @OliviaHY @RickJWagner
for approvals

@RickJWagner
Copy link

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Jul 21, 2022
@RickJWagner RickJWagner removed their assignment Jul 21, 2022
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 23, 2022
@yapei
Copy link
Contributor

yapei commented Jul 25, 2022

consume YAMLEditor in console-demo-plugin

$ git diff src/components/ListPage.tsx
diff --git a/dynamic-demo-plugin/src/components/ListPage.tsx b/dynamic-demo-plugin/src/components/ListPage.tsx
index 5ff8e9e6f8..9a28dae680 100644
--- a/dynamic-demo-plugin/src/components/ListPage.tsx
+++ b/dynamic-demo-plugin/src/components/ListPage.tsx
@@ -13,6 +13,7 @@ import {
   RowProps,
   ResourceLink,
   TableColumn,
+  YAMLEditor
 } from '@openshift-console/dynamic-plugin-sdk';
 
 const columns: TableColumn<K8sResourceCommon>[] = [
@@ -115,6 +116,11 @@ const ListPage = () => {
           loadError={loadError}
         />
       </ListPageBody>
+      <YAMLEditor
+        value="testing"
+        minHeight="100px"
+        showShortcuts
+      />
     </>
   );
 };

we can see YAML editor is rendered
Screen Shot 2022-07-25 at 14 16 37

@yapei
Copy link
Contributor

yapei commented Jul 25, 2022

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Jul 25, 2022
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 25, 2022
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 25, 2022
@vojtechszocs
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 25, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: upalatucci, vojtechszocs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@spadgett
Copy link
Member

/unassign @OliviaHY
/assign @opayne1

Sorry I must have clicked the wrong name in the autocomplete list :(

@openshift-ci openshift-ci bot assigned opayne1 and unassigned OliviaHY Jul 27, 2022
@opayne1
Copy link
Contributor

opayne1 commented Jul 27, 2022

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Jul 27, 2022
@upalatucci
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD dd6fecf and 8 for PR HEAD 8524729 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD dd6fecf and 7 for PR HEAD 8524729 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD dd6fecf and 6 for PR HEAD 8524729 in total

@upalatucci
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 6c4aadd and 5 for PR HEAD 8524729 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD 6c4aadd and 4 for PR HEAD 8524729 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 6c4aadd and 3 for PR HEAD 8524729 in total

@upalatucci
Copy link
Contributor Author

/retest

1 similar comment
@upalatucci
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 6a16c2b and 2 for PR HEAD 8524729 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD ac5e927 and 1 for PR HEAD 8524729 in total

@openshift-merge-robot openshift-merge-robot merged commit f7a31b7 into openshift:master Jul 29, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 29, 2022

@upalatucci: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/sdk Related to console-plugin-sdk component/shared Related to console-shared docs-approved Signifies that Docs has signed off on this PR lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants