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

feat(entities-shared): JSON/YAML forms [KHCP-9967][KHCP-9968][KHCP-9986] #1006

Merged
merged 33 commits into from
Jan 3, 2024

Conversation

mptap
Copy link
Contributor

@mptap mptap commented Dec 14, 2023

Summary

https://konghq.atlassian.net/browse/KHCP-9967
https://konghq.atlassian.net/browse/KHCP-9968
https://konghq.atlassian.net/browse/KHCP-9986
Note: Will handle preprocessing of each entity's fields similar to form submission in https://konghq.atlassian.net/browse/KHCP-10152

Figma of the form milestone

Behind Feature Flag Khcp-9892-json-yaml-milestone-2

  • Add the ability to copy the JSON/YAML configurations from the Entity forms
  • Add the POST/PUT endpoints in the forms
  • Put the GET endpoints in the config tables behind above FF
  • Fix bug caught during oncall review ConfigCardDisplay: TypeError: Cannot convert undefined or null to object
  • Refactor JsonCodeBlock and YamlCodeBlock into reusable components for use across Config Tables and all Forms
  • Add Component tests for JsonCodeBlock and YamlCodeBlock as well as consuming components
Screenshot 2023-12-15 at 1 02 38 PM Screenshot 2023-12-15 at 1 02 49 PM Screenshot 2023-12-15 at 1 03 04 PM Screenshot 2023-12-15 at 1 03 28 PM Screenshot 2023-12-15 at 1 03 39 PM Screenshot 2023-12-15 at 1 05 25 PM

@mptap mptap changed the title feat(entities-shared): create a KSlideout wrapper around JSON/YAML forms [KHCP-9892] feat(entities-shared): create a KSlideout wrapper around JSON/YAML forms [KHCP-9967][KHCP-9968] Dec 14, 2023
@mptap mptap changed the title feat(entities-shared): create a KSlideout wrapper around JSON/YAML forms [KHCP-9967][KHCP-9968] feat(entities-shared): JSON/YAML forms [KHCP-9967][KHCP-9968][KHCP-9986] Dec 14, 2023
@mptap mptap self-assigned this Dec 14, 2023
@mptap mptap force-pushed the feat/khcp-9892-create-kslideout-wrapper-json-yaml-forms branch 6 times, most recently from 01dbbb3 to 6f63170 Compare December 15, 2023 20:40
@mptap mptap marked this pull request as ready for review December 15, 2023 20:47
@mptap mptap requested review from a team, adamdehaven, ValeryG and jillztom as code owners December 15, 2023 20:47
@mptap mptap enabled auto-merge (squash) December 15, 2023 22:45
@jillztom
Copy link
Collaborator

Screenshot 2023-12-19 at 12 07 20 AM

Here, the tags is shown as empty string "", but the API only accepts an array/empty array. So the copied payload becomes invalid.

@mptap mptap force-pushed the feat/khcp-9892-create-kslideout-wrapper-json-yaml-forms branch from 397ca35 to 7de3b0a Compare December 19, 2023 18:19
@mptap mptap requested a review from jillztom December 19, 2023 20:11
@mptap mptap force-pushed the feat/khcp-9892-create-kslideout-wrapper-json-yaml-forms branch 2 times, most recently from f9f5207 to 2b2f6fc Compare December 21, 2023 16:49
@mptap mptap changed the title feat(entities-shared): JSON/YAML forms [KHCP-9967][KHCP-9968][KHCP-9986] feat(entities-shared): JSON/YAML forms [KHCP-9967][KHCP-9968][KHCP-9986][KHCP-10152] Dec 21, 2023
@mptap mptap force-pushed the feat/khcp-9892-create-kslideout-wrapper-json-yaml-forms branch from 06e88b7 to 4a30308 Compare January 2, 2024 18:08
@mptap mptap changed the title feat(entities-shared): JSON/YAML forms [KHCP-9967][KHCP-9968][KHCP-9986][KHCP-10152] feat(entities-shared): JSON/YAML forms [KHCP-9967][KHCP-9968][KHCP-9986] Jan 2, 2024
@mptap mptap force-pushed the feat/khcp-9892-create-kslideout-wrapper-json-yaml-forms branch from 0a187fd to 25bdfbd Compare January 3, 2024 17:44
@mptap mptap requested a review from jillztom January 3, 2024 19:06
@mptap mptap merged commit b95a9eb into main Jan 3, 2024
17 checks passed
@mptap mptap deleted the feat/khcp-9892-create-kslideout-wrapper-json-yaml-forms branch January 3, 2024 20:34
@@ -111,6 +154,9 @@ import endpoints from '../plugins-endpoints'
import composables from '../composables'
import { ArrayStringFieldSchema } from '../composables/plugin-schemas/ArrayStringFieldSchema'
import PluginEntityForm from './PluginEntityForm.vue'
import type { Tab } from '@kong/kongponents'
import JsonCodeBlock from '../../../entities-shared/src/components/common/JsonCodeBlock.vue'
Copy link
Member

Choose a reason for hiding this comment

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

@mptap these imports are incorrect, you have to import from the package itself, not a relative import.

It looks like the Kong Manager team already put up a PR to fix, but @jillztom this is also why the package size jumped

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.

3 participants