From 48a14f674dbfc0c842df3c981d4acbaf3215fcae Mon Sep 17 00:00:00 2001 From: ishikabhoyar Date: Sun, 30 Mar 2025 01:59:12 +0530 Subject: [PATCH] Refactor Panel and StatusBar components by adding comments for clarity and improving accessibility with aria-labels --- Frontend/src/components/Panel.jsx | 4 ++-- Frontend/src/components/StatusBar.jsx | 28 +++++++++++++++++++++------ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Frontend/src/components/Panel.jsx b/Frontend/src/components/Panel.jsx index 1b8d2aa..791a710 100644 --- a/Frontend/src/components/Panel.jsx +++ b/Frontend/src/components/Panel.jsx @@ -173,7 +173,7 @@ const Panel = ({ ))}
- @@ -182,7 +182,7 @@ const Panel = ({ + */} diff --git a/Frontend/src/components/StatusBar.jsx b/Frontend/src/components/StatusBar.jsx index ac28d0b..6960bd2 100644 --- a/Frontend/src/components/StatusBar.jsx +++ b/Frontend/src/components/StatusBar.jsx @@ -1,10 +1,11 @@ import React from "react"; -"use client" const StatusBar = ({ togglePanel, panelVisible }) => { return (
+ {/* Left Section of the Status Bar */}
+ {/* Branch Indicator */}
{ strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" + aria-label="Branch Icon" > @@ -25,6 +27,7 @@ const StatusBar = ({ togglePanel, panelVisible }) => { main
+ {/* Error Indicator */}
{ strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" + aria-label="Error Icon" > 0 errors
-
+ {/* Right Section of the Status Bar */}
+ {/* Line and Column Indicator */}
Ln 1, Col 1
+ {/* Spaces Indicator */}
Spaces: 2
+ {/* Encoding Indicator */}
UTF-8
+ {/* Connection Status */}
{ strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" + aria-label="Connection Icon" > @@ -80,6 +95,7 @@ const StatusBar = ({ togglePanel, panelVisible }) => { Connected
+ {/* Bell Icon */}
{ strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" + aria-label="Bell Icon" > @@ -98,8 +115,7 @@ const StatusBar = ({ togglePanel, panelVisible }) => {
- ) -} - -export default StatusBar + ); +}; +export default StatusBar; \ No newline at end of file