Skip to content

Conversation

@marekpelc-pega
Copy link
Contributor

@marekpelc-pega marekpelc-pega commented Nov 28, 2025

  • adding js component
  • adding native component
  • adding 'alive' flag to block updates from dead components
  • show display value for dropdown in readonly mode
  • few fixes in simple table
  • change requestBody to requestBodyQueue to support POST/PATCH requests one after another
  • fixing updateOptions in dropdown
  • adding Modal View Container component to support editing SimpleTableManual in popup

@marekpelc-pega marekpelc-pega requested a review from a team as a code owner November 28, 2025 10:17
@marekpelc-pega marekpelc-pega changed the title TASK-1828883: adding support for SimpleTableManual TASK-1828883: [WIP] adding support for SimpleTableManual Nov 28, 2025
@marekpelc-pega marekpelc-pega force-pushed the feature/pelcm/ISSUE-137900-ed-table branch from 6ca1a36 to 53ab06e Compare December 2, 2025 15:36
@marekpelc-pega marekpelc-pega changed the title TASK-1828883: [WIP] adding support for SimpleTableManual TASK-1828883: adding support for SimpleTableManual Dec 4, 2025
@kaidotarma
Copy link

@marekpelc-pega please keep this branch up to date with master.
Then we can test this branch while the fixes in master branch are also available. ;)

@marekpelc-pega marekpelc-pega force-pushed the feature/pelcm/ISSUE-137900-ed-table branch from 3e522b7 to f943ba6 Compare December 10, 2025 13:33
import com.pega.constellation.sdk.kmp.core.internal.ComponentManagerImpl.Companion.getComponentTyped
import kotlinx.serialization.json.JsonObject

class ModalViewContainerComponent(context: ComponentContext) : ContainerComponent(context) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be marked with HideableComponent interface.

import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.jsonObject

class SimpleTableManualComponent(context: ComponentContext) : BaseComponent(context) {
Copy link
Contributor

Choose a reason for hiding this comment

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

HideableComponent

implementation(libs.kotlinx.datetime)
implementation(libs.ksoup.http.parser)
implementation(libs.table.m3)
implementation("com.mohamedrejeb.dnd:compose-dnd:0.3.0")
Copy link
Contributor

Choose a reason for hiding this comment

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

why hardcoded package name?

val columnsJsonArray = props.getJSONArray("columnLabels")
return columnsJsonArray.mapWithIndex { getString(it) }
}

Copy link
Contributor

Choose a reason for hiding this comment

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

extra new line

waitForNode("Lists group heading", substring = true)
waitForNode("List group instructions", substring = true)
waitForNode("cars")
waitForNode("Encryption keys")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've fixed that. It was passing earlier because the table was not actually loaded and we had only 1 label of the view.
Once the table gets loaded we get label twice and that caused this assert to fail (because waitForNode checks for exactly 1 element)
Repeating label is also an issue raised as ISSUE-138617

import { Utils } from "../../helpers/utils.js";
import { BaseComponent } from "../base.component.js";
import {Utils} from "../../helpers/utils.js";
import {BaseComponent} from "../base.component.js";
Copy link
Contributor

Choose a reason for hiding this comment

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

code formatting issue - here and in many other places in JS files

};
}

function updateFieldLabels (fields, configFields, primaryFieldsViewIndex, pConnect, options) {
Copy link
Contributor

Choose a reason for hiding this comment

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

code formatting - extra space

compId;
type;
props;
alive = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

We should think about making all the components to inherit from BaseComponent at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BaseComponent has pConn and action buttons and alert banner does not...
but we may think about some refactorings in the future

]
: [];

this.alertBannerComponents = banners.map((b) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

In case there are some previous banners - should not we destroy them first?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we do that in line 247

constructor(componentsManager, pConn) {
super(componentsManager, pConn);
this.type = "SimpleTableManual";
this.utils = new Utils();
Copy link
Contributor

Choose a reason for hiding this comment

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

utils is already initialized in the super class (BaseComponent).

Copy link
Contributor

@tomaszmlocek-pega tomaszmlocek-pega left a comment

Choose a reason for hiding this comment

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

I have put some minor comments but generally changes look fine.

such update happens in dropdown component when it is created and quickly destroyed.
It happens because it is loading DP from server and once its loaded props are updated on dead component
- assignment component - sending empty children prop once assignmentCardComponent is null
- adding ModalViewContainerComponent
…PATCH requests one after another.

Sometimes 2 POST/PATCH requests are executed one after another so quickly that setting body occures twice before the calls are executed and 2nd request has 'null' body
@marekpelc-pega marekpelc-pega force-pushed the feature/pelcm/ISSUE-137900-ed-table branch from f943ba6 to 1fb80a9 Compare December 12, 2025 09:08
@marekpelc-pega marekpelc-pega merged commit 5b53664 into master Dec 12, 2025
3 checks passed
@tomaszmlocek-pega tomaszmlocek-pega linked an issue Dec 17, 2025 that may be closed by this pull request
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.

SimpleTable component only supports fieldGroup?

5 participants