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

Parametric editor implementation. #73

Merged
merged 18 commits into from
Nov 26, 2024

Conversation

kamilmadejek
Copy link
Collaborator

@kamilmadejek kamilmadejek commented Oct 17, 2024

This PR introduces the first implementation of a parametric editor - a concise and DRY way of creating resource editors.

Three editors for Nephio-specific resources have been fully reimplemented using PxeParametricEditor:

  • NephioTokenEditor -> NephioTokenParametricEditor
  • CapacityEditor -> NephioCapacityParametricEditor
  • WorkloadClusterEditor -> NephioWorkloadClusterParametricEditor

Parametric editor concept aims to simplify editor development and maintenance by allowing developers to create editors by providing resource-specific configuration, rather than implementing every instance from scratch. The main idea relies on two core principles:

  • Building UI from reusable blocks (sections, layouts, widgets) which are created according to a provided configuration.
  • Resource mutation done according to the value descriptors (type of internal metadata) from a provided configuration.

A sample configuration for a parametric editor instance looks like this (an example for WorkloadCluster resource):

image

At the moment, the parametric editor has support for basic user input widgets, handling of different data types (including YAML arrays and key-values), user input filtering and display customization. Next PRs will add more features and introduce new parametric editors.


Testing (on uitests environment, credentials available per request):


Additional changes in this PR:

  • Adjustment of eslint settings.

Copy link

nephio-prow bot commented Oct 17, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kamilmadejek kamilmadejek self-assigned this Oct 22, 2024
@kamilmadejek kamilmadejek marked this pull request as ready for review October 22, 2024 16:01
@nephio-prow nephio-prow bot requested review from johnbelamaric and tliron October 22, 2024 16:01
@kamilmadejek kamilmadejek changed the title Parametric editor implementation Parametric editor implementation. Oct 23, 2024
@efiacor
Copy link

efiacor commented Nov 26, 2024

/approve

@nephio-prow nephio-prow bot added the approved label Nov 26, 2024
Copy link
Member

@liamfallon liamfallon left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

Copy link

nephio-prow bot commented Nov 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: efiacor, kamilmadejek, liamfallon

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

@nephio-prow nephio-prow bot merged commit ec0259d into nephio-project:main Nov 26, 2024
9 checks passed
@kamilmadejek kamilmadejek deleted the editors-rework branch November 27, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants