• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / codegate-ui / 13261729647

11 Feb 2025 11:19AM UTC coverage: 68.226% (-0.5%) from 68.676%
13261729647

Pull #276

github

web-flow
Merge 5f42a30de into 7529f7310
Pull Request #276: feat: implement "Revert" button for workspace name

401 of 671 branches covered (59.76%)

Branch coverage included in aggregate %.

57 of 76 new or added lines in 11 files covered. (75.0%)

868 of 1189 relevant lines covered (73.0%)

73.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

26.67
/src/forms/rerenders/ObjectRenderer.tsx
1
import isEmpty from "lodash/isEmpty";
2
import {
3
  findUISchema,
4
  GroupLayout,
5
  isObjectControl,
6
  RankedTester,
7
  rankWith,
8
  StatePropsOfControlWithDetail,
9
} from "@jsonforms/core";
10
import { JsonFormsDispatch, withJsonFormsDetailProps } from "@jsonforms/react";
11
import { useMemo } from "react";
12

13
const ObjectRenderer = ({
4✔
14
  renderers,
15
  cells,
16
  uischemas,
17
  schema,
18
  label,
19
  path,
20
  visible,
21
  enabled,
22
  uischema,
23
  rootSchema,
24
}: StatePropsOfControlWithDetail) => {
NEW
25
  const detailUiSchema = useMemo(
×
26
    () =>
NEW
27
      findUISchema(
×
28
        uischemas ?? [],
×
29
        schema,
30
        uischema.scope,
31
        path,
32
        "Group",
33
        uischema,
34
        rootSchema,
35
      ),
36
    [uischemas, schema, path, uischema, rootSchema],
37
  );
NEW
38
  if (isEmpty(path)) {
×
NEW
39
    detailUiSchema.type = "VerticalLayout";
×
40
  } else {
NEW
41
    (detailUiSchema as GroupLayout).label = label;
×
42
  }
43
  return (
44
    <div className={visible ? "" : "hidden"}>
×
45
      <JsonFormsDispatch
46
        visible={visible}
47
        enabled={enabled}
48
        schema={schema}
49
        uischema={detailUiSchema}
50
        path={path}
51
        renderers={renderers}
52
        cells={cells}
53
      />
54
    </div>
55
  );
56
};
57

58
export const tester: RankedTester = rankWith(2, isObjectControl);
4✔
59
const renderer = withJsonFormsDetailProps(ObjectRenderer);
4✔
60

61
const config = { tester, renderer };
4✔
62

63
export default config;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc