Skip to content

Conversation

Bonymol-aot
Copy link
Contributor

@Bonymol-aot Bonymol-aot commented Sep 26, 2025

User description

Issue Tracking

JIRA: https://aottech.atlassian.net/browse/FWF-5349
Issue Type: BUG

Changes


PR Type

Bug fix, Enhancement


Description

  • Clean up SaveTemplateIcon SVG path

  • Maintain icon stroke-only design

  • Minor SCSS table bundle tweak


Diagram Walkthrough

flowchart LR
  svg["SvgIcons SaveTemplateIcon"] -- "remove filled path" --> icon["Stroke-only plus icon"]
  scss["_table.scss bundle table"] -- "minor style adjustment" --> ui["Bundle table visuals"]
Loading

File Walkthrough

Relevant files
Enhancement
index.tsx
Simplify SaveTemplateIcon to stroke-only                                 

forms-flow-components/src/components/SvgIcons/index.tsx

  • Removed filled from SaveTemplateIcon.
  • Kept stroke-based vertical and horizontal lines.
  • Ensures icon uses current color for strokes.
+1/-4     
Bug fix
_table.scss
Minor bundle table body style adjustment                                 

forms-flow-theme/scss/_table.scss

  • Minor tweak in .bundle-table-body block.
  • Preserves 75vh height for bundle tables.
+1/-1     

Copy link

github-actions bot commented Sep 26, 2025

PR Reviewer Guide 🔍

(Review updated until commit d920639)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Accessibility

The SVG icon lacks a title/aria-label or role="img" with descriptive text for screen readers; consider making it accessible or marking it decorative with aria-hidden="true" if appropriate.

export const SaveTemplateIcon = ({ color = baseColor, ...props }) => (
  <svg
    xmlns="http://www.w3.org/2000/svg"
    width="14"
    height="16"
    viewBox="0 0 14 16"
    fill="none"
  >

    <path d="M7 5L7 11" stroke={color} strokeWidth="2" strokeLinecap="round" />
    <path d="M4 8H10" stroke={color} strokeWidth="2" strokeLinecap="round" />
  </svg>
Fixed Height

Using a fixed 75vh height for '.bundle-table-body' may cause overflow or layout issues on small screens; verify responsive behavior and whether max-height would be more suitable.

.bundle-table-body{
  height: 75vh;
}

Copy link

github-actions bot commented Sep 26, 2025

PR Code Suggestions ✨

Latest suggestions up to d920639

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Prevent table overflow issues

A fixed 75vh height can cause overflow or clipped content on small screens and
inside nested scroll containers. Use a max-height with overflow control to prevent
layout breakage while keeping intended sizing.

forms-flow-theme/scss/_table.scss [1043-1045]

 .bundle-table-body{
-  height: 75vh;
+  max-height: 75vh;
+  overflow: auto;
 }
Suggestion importance[1-10]: 7

__

Why: Replacing fixed height with max-height and adding overflow control can improve responsiveness and prevent clipping; it's contextually valid and low risk, though not strictly required.

Medium
Make icon size responsive

The icon uses a fixed pixel size, which can render blurry on high-DPI screens and is
inflexible. Expose width and height via ...props and default to 1em so the icon
scales with font size while preserving the current viewBox.

forms-flow-components/src/components/SvgIcons/index.tsx [132-138]

 <svg
   xmlns="http://www.w3.org/2000/svg"
-  width="14"
-  height="16"
+  width={props.width ?? '1em'}
+  height={props.height ?? '1em'}
   viewBox="0 0 14 16"
   fill="none"
+  {...props}
 >
Suggestion importance[1-10]: 6

__

Why: Exposing width/height via props improves flexibility and scalability; the change is accurate to the snippet, though it slightly alters component API and isn't critical to the PR's intent.

Low
Restore minimal icon outline

The removed filled path likely provided the icon's bounding shape; without it, the
plus may be hard to see on transparent or light backgrounds and hit-area could be
too small. Add a non-filled, low-opacity outline or minimal bounding shape to
preserve visibility and accessibility without reverting to a fully filled icon.

forms-flow-components/src/components/SvgIcons/index.tsx [132-142]

 <svg
   xmlns="http://www.w3.org/2000/svg"
   width="14"
   height="16"
   viewBox="0 0 14 16"
   fill="none"
 >
-
+  <rect x="0.5" y="0.5" width="13" height="15" rx="1.5" stroke={color} opacity="0.3" />
   <path d="M7 5L7 11" stroke={color} strokeWidth="2" strokeLinecap="round" />
   <path d="M4 8H10" stroke={color} strokeWidth="2" strokeLinecap="round" />
 </svg>
Suggestion importance[1-10]: 5

__

Why: Valid concern about visibility after removing the filled bounding shape, and the proposed outline is a reasonable compromise; however, it changes the icon design and may not align with intended visual updates.

Low

Previous suggestions

Suggestions up to commit d920639
CategorySuggestion                                                                                                                                    Impact
General
Forward props to SVG element

The props spread isn't applied to the , making it impossible to pass accessibility
or sizing attributes. Spread ...props onto the element to restore extensibility.

forms-flow-components/src/components/SvgIcons/index.tsx [132-138]

 <svg
   xmlns="http://www.w3.org/2000/svg"
   width="14"
   height="16"
   viewBox="0 0 14 16"
   fill="none"
+  {...props}
 >
Suggestion importance[1-10]: 7

__

Why: Correctly identifies that ...props is not spread onto the <svg>, limiting accessibility and flexibility. The fix is accurate and low-risk, improving extensibility.

Medium
Preserve optional icon background

Removing the filled background path may break visual contrast in themes expecting a
solid icon. Consider retaining an optional background path controlled by a prop to
avoid regressions while allowing outline style.

forms-flow-components/src/components/SvgIcons/index.tsx [132-142]

-<svg
-  xmlns="http://www.w3.org/2000/svg"
-  width="14"
-  height="16"
-  viewBox="0 0 14 16"
-  fill="none"
->
+export const SaveTemplateIcon = ({ color = baseColor, showBackground = true, backgroundColor = color, ...props }) => (
+  <svg
+    xmlns="http://www.w3.org/2000/svg"
+    width="14"
+    height="16"
+    viewBox="0 0 14 16"
+    fill="none"
+    {...props}
+  >
+    {showBackground && (
+      <path
+        d="M2 2H12V0H2V2ZM12 2V14H14V2H12ZM12 14H2V16H12V14ZM2 14V2H0V14H2ZM2 14H2H0C0 15.1046 0.89543 16 2 16V14ZM12 14V16C13.1046 16 14 15.1046 14 14H12ZM12 2H14C14 0.895431 13.1046 0 12 0V2ZM2 0C0.89543 0 0 0.895431 0 2H2V2V0Z"
+        fill={backgroundColor}
+      />
+    )}
+    <path d="M7 5L7 11" stroke={color} strokeWidth="2" strokeLinecap="round" />
+    <path d="M4 8H10" stroke={color} strokeWidth="2" strokeLinecap="round" />
+  </svg>
+);
 
-  <path d="M7 5L7 11" stroke={color} strokeWidth="2" strokeLinecap="round" />
-  <path d="M4 8H10" stroke={color} strokeWidth="2" strokeLinecap="round" />
-</svg>
-
Suggestion importance[1-10]: 6

__

Why: Valid concern about removing the filled background path; offering an optional prop is reasonable and backward-compatible. Impact is moderate since it's a visual/UX regression risk, and the improved code accurately applies the change.

Low
Prevent table overflow and clipping

Hard-coding 75vh can cause the table body to overflow small viewports and hide
content. Constrain height with min/max or use max-height and enable scrolling to
prevent clipping.

forms-flow-theme/scss/_table.scss [1043-1045]

 .bundle-table-body{
-  height: 75vh;
+  max-height: 75vh;
+  overflow: auto;
 }
Suggestion importance[1-10]: 5

__

Why: Suggestion is reasonable to improve usability on small viewports by using max-height and scrolling; however, it changes intended layout and may not be universally desired. Improvement is contextual and moderate in impact.

Low
Suggestions up to commit 35eb12e
CategorySuggestion                                                                                                                                    Impact
General
Stabilize empty state positioning

Removing absolute positioning without defining a layout context can cause the empty
state message to shift layout or overlap content depending on parent styles. If the
intent is to center within the table area, switch to flex centering to maintain
predictable placement without overlap.

forms-flow-theme/scss/_table.scss [522-529]

 & .empty-message {
   @include textBase($fontSmallest, $gray-medium-dark);
   @include paddingLvl2();
 
   width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
 
   text-align: center;
 }
Suggestion importance[1-10]: 6

__

Why: Replacing removed absolute positioning with flex centering is a reasonable, low-risk way to keep the empty state predictably centered without overlap, though it assumes the parent layout supports this and may not be strictly necessary.

Low
Preserve icon bounding box

The previous filled path defining the icon's boundary was removed, which may cause
the icon to become invisible on backgrounds that match the page color and shrink the
tappable area. Add an explicit transparent rectangle to preserve the 14x16 viewbox
hit area and ensure consistent rendering across themes.

forms-flow-components/src/components/SvgIcons/index.tsx [140-142]

+<rect x="0" y="0" width="14" height="16" fill="transparent" />
 <path d="M7 5L7 11" stroke={color} strokeWidth="2" strokeLinecap="round" />
 <path d="M4 8H10" stroke={color} strokeWidth="2" strokeLinecap="round" />
Suggestion importance[1-10]: 4

__

Why: Adding a transparent rect can help maintain a consistent hit area, but SVG pointer events on transparent fills may not improve accessibility by default and the icon remains visible due to strokes; impact is minor and context-dependent yet harmless.

Low

@Bonymol-aot Bonymol-aot marked this pull request as draft September 30, 2025 09:38
Copy link

Copy link

Persistent review updated to latest commit d920639

@Bonymol-aot Bonymol-aot marked this pull request as ready for review September 30, 2025 11:02
Copy link

Persistent review updated to latest commit d920639

@arun-s-aot arun-s-aot merged commit d295327 into AOT-Technologies:develop Sep 30, 2025
4 checks passed
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.

4 participants