Skip to content

fix/INJIWEB-1789-isserspageupdate - #486

Open
sanehema9 wants to merge 5 commits into
inji:developfrom
sanehema9:fix/INJIWEB-1789-isserspageupdate
Open

fix/INJIWEB-1789-isserspageupdate#486
sanehema9 wants to merge 5 commits into
inji:developfrom
sanehema9:fix/INJIWEB-1789-isserspageupdate

Conversation

@sanehema9

@sanehema9 sanehema9 commented Jan 12, 2026

Copy link
Copy Markdown

Description

changed the files
CredentialList.tsx , CredentialListWrapper.tsx , CredentialsPage.tsx , Issuerspage.tsx and IssuersList.tsx

Issue ticket number and link

INJIWEB-1789(https://mosip.atlassian.net/browse/INJIWEB-1789)

Video

INJIWEB-1789.mp4

##Screenshot
image

Summary by CodeRabbit

  • Style

    • Improved responsive grid layout for credential and issuer listings across screen sizes.
    • Streamlined loading, empty-state and spacing for clearer, consistent presentation.
  • Chores

    • Standardized DOM/wrapper structure and made layout props optional to simplify component composition.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: sanehema9 <sanehema9@gmail.com>
@coderabbitai

coderabbitai Bot commented Jan 12, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

UI/layout-only updates: responsive grid wrappers and minor class/tags adjustments across credential and issuer components and pages; CredentialListWrapper.className made optional with a default; useParams typing in CredentialsPage switched to an inline type. No business logic, API, or state-management changes. (34 words)

Changes

Cohort / File(s) Summary
Credential UI
inji-web/src/components/Credentials/CredentialList.tsx, inji-web/src/components/Credentials/CredentialListWrapper.tsx
Added col-span-full to a credential items wrapper; made CredentialListWrapperProps.className optional (className?: string) with default ""; wrapped CredentialList in a responsive grid (grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6) and adjusted DOM nesting.
Issuers UI
inji-web/src/components/Issuers/IssuersList.tsx, inji-web/src/pages/IssuersPage.tsx
Replaced flex wrappers with a responsive grid for issuer items (grid-cols-1 sm:grid-cols-2 lg:grid-cols-3); simplified empty/error/loading branches and removed extra wrapper elements; normalized JSX formatting and spacing.
Credentials Page
inji-web/src/pages/CredentialsPage.tsx
Changed useParams type to inline { issuerId: string }; switched selectedIssuer declaration to const; added an outer container div around CredentialListWrapper (layout/class changes only).
Header / Common
inji-web/src/components/Common/HeaderTile.tsx
Removed flex utility from a header text container and replaced one flex with whitespace-nowrap to control wrapping (styling adjustment).
Manifest
package.json
Single-line edit in manifest (minor change).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • jackjain
  • swatigoel

Poem

🐰
I hopped through grids and set the span,
Gave props a nook and a tidy plan,
Columns twirl where rows once played,
A lighter DOM where classes stayed,
Carrots for code — a cheerful stand!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is a ticket reference (fix/INJIWEB-1789-isserspageupdate) that is overly vague and doesn't clearly describe the main change to someone scanning PR history. Use a descriptive title that summarizes the primary change, e.g., 'Refactor IssuersList and CredentialList layout to use responsive grid' or similar.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
inji-web/src/components/Credentials/CredentialList.tsx (1)

97-119: Layout inconsistency between success and empty/error states.

The success case returns a React Fragment, making HeaderTile and the credentials container separate grid items within the parent grid (grid-cols-1 sm:grid-cols-2 lg:grid-cols-3). This means HeaderTile will only occupy 1 column on larger screens.

However, the empty/error states (lines 76-84) wrap both HeaderTile and content in a single <div>, making them one grid item.

Consider wrapping both elements in a single container with col-span-full for consistent layout:

Suggested fix for consistent layout
     return (
-        <>
+        <div className="col-span-full">
             <HeaderTile
                 content={t("containerHeading")}
                 subContent={t("containerSubHeading")}
             />
            <div className="col-span-full flex flex-wrap gap-3 p-4 pb-20 justify-start">
+           <div className="flex flex-wrap gap-3 p-4 pb-20 justify-start">
                 {filteredCredentialsWithLangSupport.map(
                     ...
                 )}
             </div>
-        </>
+        </div>
     );
🤖 Fix all issues with AI agents
In @inji-web/src/components/Issuers/IssuersList.tsx:
- Around line 32-34: The Issuer component is missing the required index prop
when rendered in the map; update the issuers.filtered_issuers.map callback in
IssuersList (where <Issuer key={issuer.issuer_id} issuer={issuer} /> is used) to
accept the map index and pass it as the index prop to <Issuer> (matching
IssuerProps and the index expected by ItemBox), e.g., map((issuer, index) =>
<Issuer key={issuer.issuer_id} issuer={issuer} index={index} />).
🧹 Nitpick comments (3)
inji-web/src/components/Issuers/IssuersList.tsx (1)

18-37: Inconsistent indentation throughout the component.

The file mixes 2-space and 4-space indentation (e.g., lines 22-26 use 2-space, while lines 30, 35-36 use 4-space). Consider running a formatter to ensure consistent code style.

inji-web/src/pages/IssuersPage.tsx (2)

50-62: Consider simplifying error handling logic.

The try/catch in initializeIssuersData catches errors from both fetchUserProfile and fetchIssuers. However, fetchIssuers already handles its own errors internally (lines 29-31) and won't throw. The outer catch block will only catch errors from fetchUserProfile.

For clarity, consider either:

  1. Wrapping only fetchUserProfile in try/catch, or
  2. Adding a comment explaining the intended error handling scope.
♻️ Suggested clarification
         const initializeIssuersData = async () => {
             if (isUserLoggedIn()) {
                 try {
                     await fetchUserProfile();
-                    await fetchIssuers();
                 } catch (error: any) {
                     console.error("Error fetching user profile:", error);
                     toast.error(t("errorContent"));
+                    return;
                 }
-            } else {
-                await fetchIssuers();
             }
+            await fetchIssuers();
         };

68-78: Inconsistent indentation in JSX.

Similar to IssuersList.tsx, this file mixes 2-space (lines 70-74) and 4-space (lines 72-76) indentation. Consider running a formatter for consistent styling across the codebase.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 222fcb4 and 73fab92.

📒 Files selected for processing (5)
  • inji-web/src/components/Credentials/CredentialList.tsx
  • inji-web/src/components/Credentials/CredentialListWrapper.tsx
  • inji-web/src/components/Issuers/IssuersList.tsx
  • inji-web/src/pages/CredentialsPage.tsx
  • inji-web/src/pages/IssuersPage.tsx
🧰 Additional context used
🧬 Code graph analysis (3)
inji-web/src/components/Issuers/IssuersList.tsx (6)
inji-web/src/components/Common/GradientWrapper.tsx (1)
  • GradientWrapper (4-25)
inji-web/src/components/Common/SpinningLoader.tsx (1)
  • SpinningLoader (4-21)
inji-web/src/components/Common/HeaderTile.tsx (1)
  • HeaderTile (4-11)
inji-web/src/components/Common/EmptyListContainer.tsx (1)
  • EmptyListContainer (4-13)
inji-web/src/types/data.d.ts (1)
  • IssuerObject (42-57)
inji-web/src/components/Issuers/Issuer.tsx (1)
  • Issuer (12-30)
inji-web/src/pages/CredentialsPage.tsx (3)
inji-web/src/types/redux.d.ts (1)
  • RootState (3-3)
inji-web/src/types/data.d.ts (2)
  • IssuerWellknownDisplayArrayObject (7-14)
  • IssuerObject (42-57)
inji-web/src/components/Credentials/CredentialListWrapper.tsx (1)
  • CredentialListWrapper (10-22)
inji-web/src/components/Credentials/CredentialListWrapper.tsx (1)
inji-web/src/components/Credentials/CredentialList.tsx (1)
  • CredentialList (18-121)
🔇 Additional comments (4)
inji-web/src/pages/CredentialsPage.tsx (1)

82-87: Good responsive container structure.

The container wrapper with responsive padding (px-4 sm:px-6 md:px-10 lg:px-20) provides proper mobile-first responsive design, while the container mx-auto ensures consistent max-width and centering.

inji-web/src/components/Credentials/CredentialListWrapper.tsx (2)

5-10: Good use of optional prop with default value.

Making className optional with an empty string default is a clean approach that maintains backward compatibility.


16-19: Grid wrapper may not achieve intended responsive layout.

The responsive grid (grid-cols-1 sm:grid-cols-2 lg:grid-cols-3) is applied here, but CredentialList returns a Fragment containing:

  1. HeaderTile (becomes 1 grid item)
  2. A div with flex flex-wrap containing credential cards

The credential cards themselves use flexbox layout (flex flex-wrap), not CSS grid, so this grid wrapper won't directly control the card column layout. The grid only affects the Fragment's direct children (HeaderTile and the wrapper div), not the individual cards.

If the goal is responsive card columns, consider either:

  1. Moving the grid classes to the credential cards' container inside CredentialList
  2. Or restructuring so credential cards are direct grid children

Please verify the rendered layout matches expectations across breakpoints (mobile, tablet, desktop).

inji-web/src/pages/IssuersPage.tsx (1)

15-15: LGTM on simplified component signature.

Removing the unused className prop and simplifying the type to React.FC is a good cleanup.

Comment thread inji-web/src/components/Issuers/IssuersList.tsx Outdated
Signed-off-by: sanehema9 <sanehema9@gmail.com>
@sanehema9

Copy link
Copy Markdown
Author

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)

inji-web/src/components/Credentials/CredentialList.tsx (1)> 97-119: Layout inconsistency between success and empty/error states.

The success case returns a React Fragment, making HeaderTile and the credentials container separate grid items within the parent grid (grid-cols-1 sm:grid-cols-2 lg:grid-cols-3). This means HeaderTile will only occupy 1 column on larger screens.
However, the empty/error states (lines 76-84) wrap both HeaderTile and content in a single <div>, making them one grid item.
Consider wrapping both elements in a single container with col-span-full for consistent layout:

Suggested fix for consistent layout

     return (
-        <>
+        <div className="col-span-full">
             <HeaderTile
                 content={t("containerHeading")}
                 subContent={t("containerSubHeading")}
             />
            <div className="col-span-full flex flex-wrap gap-3 p-4 pb-20 justify-start">
+           <div className="flex flex-wrap gap-3 p-4 pb-20 justify-start">
                 {filteredCredentialsWithLangSupport.map(
                     ...
                 )}
             </div>
-        </>
+        </div>
     );

🤖 Fix all issues with AI agents

In @inji-web/src/components/Issuers/IssuersList.tsx:
- Around line 32-34: The Issuer component is missing the required index prop
when rendered in the map; update the issuers.filtered_issuers.map callback in
IssuersList (where <Issuer key={issuer.issuer_id} issuer={issuer} /> is used) to
accept the map index and pass it as the index prop to <Issuer> (matching
IssuerProps and the index expected by ItemBox), e.g., map((issuer, index) =>
<Issuer key={issuer.issuer_id} issuer={issuer} index={index} />).

🧹 Nitpick comments (3)

inji-web/src/components/Issuers/IssuersList.tsx (1)> 18-37: Inconsistent indentation throughout the component.

The file mixes 2-space and 4-space indentation (e.g., lines 22-26 use 2-space, while lines 30, 35-36 use 4-space). Consider running a formatter to ensure consistent code style.

inji-web/src/pages/IssuersPage.tsx (2)> 50-62: Consider simplifying error handling logic.

The try/catch in initializeIssuersData catches errors from both fetchUserProfile and fetchIssuers. However, fetchIssuers already handles its own errors internally (lines 29-31) and won't throw. The outer catch block will only catch errors from fetchUserProfile.
For clarity, consider either:

  1. Wrapping only fetchUserProfile in try/catch, or
  2. Adding a comment explaining the intended error handling scope.

♻️ Suggested clarification

         const initializeIssuersData = async () => {
             if (isUserLoggedIn()) {
                 try {
                     await fetchUserProfile();
-                    await fetchIssuers();
                 } catch (error: any) {
                     console.error("Error fetching user profile:", error);
                     toast.error(t("errorContent"));
+                    return;
                 }
-            } else {
-                await fetchIssuers();
             }
+            await fetchIssuers();
         };

68-78: Inconsistent indentation in JSX.
Similar to IssuersList.tsx, this file mixes 2-space (lines 70-74) and 4-space (lines 72-76) indentation. Consider running a formatter for consistent styling across the codebase.

📜 Review details

Fixed the missing index prop in IssuersList.tsx. The latest commit addresses the issue flagged by the bot. Ready for review

Comment thread inji-web/src/pages/IssuersPage.tsx Outdated
import {useUser} from "../hooks/User/useUser";

export const IssuersPage: React.FC<IssuerPageProps> = ({className}) => {
export const IssuersPage: React.FC = () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did we confirm on the usages of the components before removing the className ? Please check the post login flow if the alignment is working properly on it. Please add the video for it in the PR post checking it.

Comment thread inji-web/src/pages/IssuersPage.tsx Outdated
// Excludes issuers with protocol 'OTP' and those whose issuer_id is in the ignoredIssuersFromRendering list (or contains any ignored issuer id as a substring).
issuer.protocol !== 'OTP' &&
(ignoredIssuerIds.length === 0 || !ignoredIssuerIds.some((ignoredIssuerId) =>
issuer.protocol !== "OTP" &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did we intend to remove the comment here ?

@sanehema9
sanehema9 requested a review from jackjain January 29, 2026 15:55
Signed-off-by: sanehema9 <sanehema9@gmail.com>
Signed-off-by: sanehema9 <sanehema9@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
inji-web/src/pages/IssuersPage.tsx (1)

70-76: ⚠️ Potential issue | 🟠 Major

Add top margin to IssuersList to maintain consistent spacing.

The flex wrapper (line 71) with gap-6 provides 1.5rem spacing between IntroBox and SearchIssuer, but IssuersList (line 75) is a sibling outside this wrapper without its own top margin. This creates inconsistent vertical spacing. Add mt-6 to the IssuersList component to match the spacing pattern, or move it inside the flex wrapper.

@Rudhhi-Shah-14 Rudhhi-Shah-14 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Image

The code changes are breaking the existing UI. Please ensure the existing UI is not impacted.

Signed-off-by: sanehema9 <sanehema9@gmail.com>
@sanehema9

Copy link
Copy Markdown
Author

Image

The code changes are breaking the existing UI. Please ensure the existing UI is not impacted.

fixed the line break

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
inji-web/src/components/Common/HeaderTile.tsx (2)

7-7: Nit: Trailing space in className string.

There's a trailing space at the end of the className on line 7. Consider removing it for consistency.

🧹 Remove trailing space
-             className={"text-center font-bold text-iw-title mt-8 text-[24px] leading-[32px] "}>{content}</div>
+             className={"text-center font-bold text-iw-title mt-8 text-[24px] leading-[32px]"}>{content}</div>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@inji-web/src/components/Common/HeaderTile.tsx` at line 7, The className
string in HeaderTile's JSX contains a trailing space after the last class
selector; remove the trailing space in the className prop on the element
rendering {content} so the string ends with the final class (e.g.,
"leading-[32px]") without extra whitespace, ensuring the className value is
normalized in the HeaderTile component.

8-9: whitespace-nowrap may cause horizontal overflow on narrow screens.

If subContent is long, the text will not wrap and could overflow the container on mobile or smaller viewports. Consider adding overflow handling or allowing the text to wrap.

💡 Option: Add overflow handling if nowrap is required
         <div data-testid="HeaderTile-Text-SubContent"
-             className={"text-center text-iw-subTitle text-[14px] leading-[20px] font-medium mb-8 mt-2 whitespace-nowrap"}>{subContent}</div>
+             className={"text-center text-iw-subTitle text-[14px] leading-[20px] font-medium mb-8 mt-2 whitespace-nowrap overflow-hidden text-ellipsis"}>{subContent}</div>

Alternatively, if wrapping is acceptable for long text, remove whitespace-nowrap entirely.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@inji-web/src/components/Common/HeaderTile.tsx` around lines 8 - 9, The
HeaderTile component's subcontent div (data-testid="HeaderTile-Text-SubContent")
uses whitespace-nowrap which will cause horizontal overflow for long subContent
on small screens; either remove whitespace-nowrap to allow wrapping (so the text
wraps naturally), or replace it with responsive/overflow-safe styling such as
adding overflow-hidden, text-ellipsis/truncate and break-words (or make nowrap
only on larger screens via sm:whitespace-nowrap) so long text is
clipped/ellipsized instead of overflowing. Update the class on the HeaderTile
subContent div accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@inji-web/src/components/Common/HeaderTile.tsx`:
- Line 7: The className string in HeaderTile's JSX contains a trailing space
after the last class selector; remove the trailing space in the className prop
on the element rendering {content} so the string ends with the final class
(e.g., "leading-[32px]") without extra whitespace, ensuring the className value
is normalized in the HeaderTile component.
- Around line 8-9: The HeaderTile component's subcontent div
(data-testid="HeaderTile-Text-SubContent") uses whitespace-nowrap which will
cause horizontal overflow for long subContent on small screens; either remove
whitespace-nowrap to allow wrapping (so the text wraps naturally), or replace it
with responsive/overflow-safe styling such as adding overflow-hidden,
text-ellipsis/truncate and break-words (or make nowrap only on larger screens
via sm:whitespace-nowrap) so long text is clipped/ellipsized instead of
overflowing. Update the class on the HeaderTile subContent div accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5c5dd193-4d10-4936-9e66-f6d216ffec29

📥 Commits

Reviewing files that changed from the base of the PR and between 23a9f65 and ed5a948.

📒 Files selected for processing (1)
  • inji-web/src/components/Common/HeaderTile.tsx

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.

4 participants