Skip to content

Commit 22c8584

Browse files
authored
Merge pull request #66 from PratikTomar/bugfix/issue-65-Keyboard-Navigation
2 parents 44e4d3a + c4f9392 commit 22c8584

12 files changed

+54
-54
lines changed

src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ function App() {
12381238
</div>
12391239
{/* Mobile: Social + Actions grouped and centered, Desktop: inline */}
12401240
<div className="flex flex-col items-center w-full sm:hidden">
1241-
<div className="w-full max-w-sm bg-gray-50 rounded-xl py-2 px-2 shadow-sm mt-2">
1241+
<div className="w-full max-w-sm bg-gray-50 rounded-xl py-2 px-2 shadow-sm mt-2 dark:bg-gray-800">
12421242
<div className="flex items-center justify-center space-x-2 mb-2">
12431243
<SocialShare />
12441244
</div>
@@ -1952,10 +1952,10 @@ function App() {
19521952
{roleBindings.map((rb, i) => {
19531953
const isSelected = selectedRoleBindingIndex === i;
19541954
return (
1955-
<div
1955+
<button
19561956
key={i}
19571957
onClick={() => setSelectedRoleBindingIndex(i)}
1958-
className={`p-2 border rounded-lg cursor-pointer transition-all duration-200 hover:shadow-md hover:bg-blue-50 focus-within:ring-2 focus-within:ring-blue-200 outline-none group
1958+
className={`p-2 border rounded-lg w-full text-left cursor-pointer transition-all duration-200 hover:shadow-md hover:bg-blue-50 focus-within:ring-2 focus-within:ring-blue-200 outline-none group
19591959
${isSelected
19601960
? rb.isClusterRoleBinding
19611961
? 'border-blue-500 bg-blue-50 shadow-md dark:border-blue-600 dark:bg-blue-600 dark:shadow-blue-600'
@@ -2064,7 +2064,7 @@ function App() {
20642064
<div>This action cannot be undone.</div>
20652065
</div>
20662066
)}
2067-
</div>
2067+
</button>
20682068
);
20692069
})}
20702070
</div>

src/components/ConfigMapsList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ export function ConfigMapsList({
6464
return (
6565
<div className="space-y-1 p-4">
6666
{configMaps.map((configMap, index) => (
67-
<div
67+
<button
6868
key={configMap.name}
69-
className={`p-3 rounded-lg border cursor-pointer transition-all duration-200 ${
69+
className={`p-3 rounded-lg border cursor-pointer transition-all w-full text-left duration-200 ${
7070
selectedIndex === index
7171
? 'bg-green-50 border-green-200 ring-1 ring-green-200 dark:bg-green-700 dark:border-green-800 dark:ring-green-800'
7272
: 'bg-white border-gray-200 hover:bg-gray-50 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600'
@@ -199,7 +199,7 @@ export function ConfigMapsList({
199199
</div>
200200
</div>
201201
)}
202-
</div>
202+
</button>
203203
))}
204204
</div>
205205
);

src/components/DaemonSetsList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ export function DaemonSetsList({
7474
{daemonSets.map((daemonSet, index) => {
7575
const summary = getDaemonSetSummary(daemonSet);
7676
return (
77-
<div
77+
<button
7878
key={index}
79-
className={`p-3 rounded-lg border cursor-pointer transition-all duration-200 ${
79+
className={`p-3 rounded-lg w-full text-left border cursor-pointer transition-all duration-200 ${
8080
selectedDaemonSet === index
8181
? 'bg-blue-50 border-blue-200 ring-1 ring-blue-200 dark:bg-blue-900 dark:border-blue-800 dark:ring-blue-800'
8282
: 'bg-white border-gray-200 hover:bg-gray-50 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700'
@@ -181,7 +181,7 @@ export function DaemonSetsList({
181181
</div>
182182
</div>
183183
)}
184-
</div>
184+
</button>
185185
);
186186
})}
187187
</div>

src/components/DeploymentsList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function DeploymentsList({
6161
const summary = getDeploymentSummary(deployment);
6262

6363
return (
64-
<div
64+
<button
6565
key={index}
6666
className={`p-3 rounded-lg border cursor-pointer transition-all duration-200 text-left w-full ${
6767
selectedIndex === index
@@ -170,7 +170,7 @@ export function DeploymentsList({
170170
</div>
171171
</div>
172172
)}
173-
</div>
173+
</button>
174174
);
175175
})}
176176
</div>

src/components/DockerRunPopup.tsx

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function DockerRunPopup({ isOpen, onClose }: DockerRunPopupProps) {
4242
/>
4343

4444
{/* Popup Container */}
45-
<div className="relative bg-white rounded-xl shadow-2xl w-full max-w-4xl mx-auto overflow-hidden max-h-[90vh] flex flex-col">
45+
<div className="relative bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl mx-auto overflow-hidden max-h-[90vh] flex flex-col">
4646
{/* Header */}
4747
<div className="flex items-center justify-between p-4 sm:p-6 border-b border-gray-200 bg-gradient-to-r from-blue-600 to-blue-700 text-white flex-shrink-0">
4848
<div className="flex items-center space-x-3 min-w-0 flex-1">
@@ -66,17 +66,17 @@ export function DockerRunPopup({ isOpen, onClose }: DockerRunPopupProps) {
6666
{/* Content */}
6767
<div className="flex-1 overflow-y-auto p-4 sm:p-6 space-y-4 sm:space-y-6">
6868
{/* Quick Start */}
69-
<div className="bg-gradient-to-r from-green-50 to-emerald-50 rounded-lg p-3 sm:p-4 border border-green-200">
69+
<div className="bg-gradient-to-r from-green-50 to-emerald-50 rounded-lg p-3 sm:p-4 border border-green-200 dark:bg-gradient-to-r dark:from-green-900 dark:to-emerald-900 dark:border-green-800">
7070
<div className="flex items-center space-x-2 mb-3">
7171
<Play className="w-4 h-4 sm:w-5 sm:h-5 text-green-600 flex-shrink-0" />
72-
<h4 className="font-semibold text-green-900 text-sm sm:text-base">Quick Start</h4>
72+
<h4 className="font-semibold text-green-900 text-sm sm:text-base dark:text-green-200">Quick Start</h4>
7373
</div>
74-
<p className="text-xs sm:text-sm text-green-800 mb-3 sm:mb-4">
74+
<p className="text-xs sm:text-sm text-green-800 mb-3 sm:mb-4 dark:text-green-200">
7575
Run this single command to pull and start Kube Composer locally in the background:
7676
</p>
7777

7878
{/* Command Box */}
79-
<div className="bg-gray-900 rounded-lg p-3 sm:p-4 relative">
79+
<div className="bg-gray-900 rounded-lg p-3 sm:p-4 relative dark:bg-gray-800 dark:border-gray-700">
8080
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between mb-2 space-y-2 sm:space-y-0">
8181
<div className="flex items-center space-x-2">
8282
<Terminal className="w-3 h-3 sm:w-4 sm:h-4 text-gray-400 flex-shrink-0" />
@@ -107,13 +107,13 @@ export function DockerRunPopup({ isOpen, onClose }: DockerRunPopupProps) {
107107
</div>
108108

109109
{/* Step by Step Instructions */}
110-
<div className="space-y-3 sm:space-y-4">
111-
<h4 className="font-semibold text-gray-900 flex items-center space-x-2 text-sm sm:text-base">
110+
<div className="space-y-3 sm:space-y-4 dark:text-gray-200">
111+
<h4 className="font-semibold text-gray-900 flex items-center space-x-2 text-sm sm:text-base dark:text-gray-200">
112112
<span className="w-5 h-5 sm:w-6 sm:h-6 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center text-xs sm:text-sm font-bold flex-shrink-0">1</span>
113113
<span>Prerequisites</span>
114114
</h4>
115115
<div className="ml-6 sm:ml-8 space-y-2">
116-
<p className="text-xs sm:text-sm text-gray-600">
116+
<p className="text-xs sm:text-sm text-gray-600 dark:text-gray-200">
117117
Make sure you have Docker installed on your system:
118118
</p>
119119
<div className="flex flex-col sm:flex-row sm:items-center space-y-2 sm:space-y-0 sm:space-x-4">
@@ -140,35 +140,35 @@ export function DockerRunPopup({ isOpen, onClose }: DockerRunPopupProps) {
140140
</div>
141141
</div>
142142

143-
<h4 className="font-semibold text-gray-900 flex items-center space-x-2 text-sm sm:text-base">
143+
<h4 className="font-semibold text-gray-900 flex items-center space-x-2 text-sm sm:text-base dark:text-gray-200">
144144
<span className="w-5 h-5 sm:w-6 sm:h-6 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center text-xs sm:text-sm font-bold flex-shrink-0">2</span>
145145
<span>Run the Command</span>
146146
</h4>
147147
<div className="ml-6 sm:ml-8 space-y-2">
148-
<p className="text-xs sm:text-sm text-gray-600">
148+
<p className="text-xs sm:text-sm text-gray-600 dark:text-gray-200">
149149
Open your terminal and run the command above. This will:
150150
</p>
151-
<ul className="text-xs sm:text-sm text-gray-600 space-y-1 list-disc list-inside ml-2 sm:ml-4">
151+
<ul className="text-xs sm:text-sm text-gray-600 space-y-1 list-disc list-inside ml-2 sm:ml-4 dark:text-gray-200">
152152
<li>Pull the latest Kube Composer Docker image</li>
153153
<li>Start the container in detached mode (background)</li>
154-
<li>Make it accessible at <code className="bg-gray-100 px-1 rounded text-xs">http://localhost:8080</code></li>
154+
<li>Make it accessible at <code className="bg-gray-100 px-1 rounded text-xs dark:bg-gray-700">http://localhost:8080</code></li>
155155
</ul>
156156
</div>
157157

158-
<h4 className="font-semibold text-gray-900 flex items-center space-x-2 text-sm sm:text-base">
158+
<h4 className="font-semibold text-gray-900 flex items-center space-x-2 text-sm sm:text-base dark:text-gray-200">
159159
<span className="w-5 h-5 sm:w-6 sm:h-6 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center text-xs sm:text-sm font-bold flex-shrink-0">3</span>
160160
<span>Access the Application</span>
161161
</h4>
162162
<div className="ml-6 sm:ml-8 space-y-2">
163-
<p className="text-xs sm:text-sm text-gray-600">
163+
<p className="text-xs sm:text-sm text-gray-600 dark:text-gray-200">
164164
Once the container is running, open your browser and navigate to:
165165
</p>
166-
<div className="bg-blue-50 border border-blue-200 rounded-lg p-3">
166+
<div className="bg-blue-50 border border-blue-200 rounded-lg p-3 dark:bg-blue-700 dark:border-blue-600">
167167
<a
168168
href="http://localhost:8080"
169169
target="_blank"
170170
rel="noopener noreferrer"
171-
className="inline-flex items-center space-x-2 text-blue-700 hover:text-blue-800 font-medium text-sm sm:text-base break-all"
171+
className="inline-flex items-center space-x-2 text-blue-700 hover:text-blue-800 font-medium text-sm sm:text-base break-all dark:text-blue-200"
172172
>
173173
<span>http://localhost:8080</span>
174174
<ExternalLink className="w-3 h-3 sm:w-4 sm:h-4 flex-shrink-0" />
@@ -178,9 +178,9 @@ export function DockerRunPopup({ isOpen, onClose }: DockerRunPopupProps) {
178178
</div>
179179

180180
{/* Benefits */}
181-
<div className="bg-gradient-to-r from-purple-50 to-indigo-50 rounded-lg p-3 sm:p-4 border border-purple-200">
182-
<h4 className="font-semibold text-purple-900 mb-3 text-sm sm:text-base">Why Run Locally?</h4>
183-
<ul className="text-xs sm:text-sm text-purple-800 space-y-1">
181+
<div className="bg-gradient-to-r from-purple-50 to-indigo-50 rounded-lg p-3 sm:p-4 border border-purple-200 dark:bg-gradient-to-r dark:from-purple-900 dark:to-indigo-900 dark:border-purple-800">
182+
<h4 className="font-semibold text-purple-900 mb-3 text-sm sm:text-base dark:text-purple-200">Why Run Locally?</h4>
183+
<ul className="text-xs sm:text-sm text-purple-800 space-y-1 dark:text-purple-200">
184184
<li><strong>Privacy:</strong> Your data never leaves your machine</li>
185185
<li><strong>Speed:</strong> No network latency, instant responses</li>
186186
<li><strong>Offline:</strong> Works without internet connection</li>
@@ -190,12 +190,12 @@ export function DockerRunPopup({ isOpen, onClose }: DockerRunPopupProps) {
190190
</div>
191191

192192
{/* Footer */}
193-
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between p-4 sm:p-6 border-t border-gray-200 bg-gray-50 space-y-3 sm:space-y-0 flex-shrink-0">
194-
<div className="text-xs sm:text-sm text-gray-600">
193+
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between p-4 sm:p-6 border-t border-gray-200 bg-gray-50 dark:bg-gray-800 space-y-3 sm:space-y-0 flex-shrink-0">
194+
<div className="text-xs sm:text-sm text-gray-600 dark:text-gray-200">
195195
<p className="flex items-center">
196196
<Docker className="w-3 h-3 sm:w-4 sm:h-4 mr-2 text-blue-600 flex-shrink-0" />
197197
<span className="mr-1">Image:</span>
198-
<code className="bg-gray-200 px-1 rounded text-xs break-all">same7ammar/kube-composer</code>
198+
<code className="bg-gray-200 px-1 rounded text-xs break-all dark:bg-gray-700 dark:text-gray-200">same7ammar/kube-composer</code>
199199
</p>
200200
</div>
201201
<div className="flex flex-col sm:flex-row sm:items-center space-y-2 sm:space-y-0 sm:space-x-3">

src/components/NamespacesList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function NamespacesList({
6161
return (
6262
<div className="space-y-1 p-4">
6363
{namespaces.map((namespace, index) => (
64-
<div
64+
<button
6565
key={namespace.name}
6666
className={`p-3 rounded-lg border cursor-pointer transition-all duration-200 ${
6767
selectedIndex === index
@@ -200,7 +200,7 @@ export function NamespacesList({
200200
</div>
201201
</div>
202202
)}
203-
</div>
203+
</button>
204204
))}
205205

206206
{namespaces.length === 0 && (

src/components/RolesList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ export function RolesList({
6464
return (
6565
<div className="space-y-2 p-4">
6666
{roles.map((role, index) => (
67-
<div
67+
<button
6868
key={index}
6969
onClick={() => onSelect(index)}
70-
className={`p-3 border rounded-lg cursor-pointer transition-all duration-200 hover:shadow-md ${
70+
className={`p-3 border rounded-lg cursor-pointer transition-all w-full text-left duration-200 hover:shadow-md ${
7171
selectedIndex === index
7272
? 'border-purple-300 bg-purple-50 shadow-sm dark:border-purple-800 dark:bg-purple-700 dark:shadow-sm'
7373
: 'border-gray-200 bg-white hover:border-gray-300 hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-700 dark:hover:border-gray-500 dark:hover:bg-gray-600'
@@ -170,7 +170,7 @@ export function RolesList({
170170
<div>This action cannot be undone.</div>
171171
</div>
172172
)}
173-
</div>
173+
</button>
174174
))}
175175
</div>
176176
);

src/components/SecretsList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ export function SecretsList({
8080
return (
8181
<div className="space-y-1 p-4">
8282
{secrets.map((secret, index) => (
83-
<div
83+
<button
8484
key={secret.name}
85-
className={`p-3 rounded-lg border cursor-pointer transition-all duration-200 ${
85+
className={`p-3 rounded-lg border cursor-pointer transition-all w-full text-left duration-200 ${
8686
selectedIndex === index
8787
? 'bg-orange-50 border-orange-200 ring-1 ring-orange-200 dark:bg-orange-700 dark:border-orange-800 dark:ring-orange-800'
8888
: 'bg-white border-gray-200 hover:bg-gray-50 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600'
@@ -224,7 +224,7 @@ export function SecretsList({
224224
</div>
225225
</div>
226226
)}
227-
</div>
227+
</button>
228228
))}
229229
</div>
230230
);

src/components/ServiceAccountsList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ export function ServiceAccountsList({
6565
return (
6666
<div className="space-y-3 p-4">
6767
{serviceAccounts.map((serviceAccount, index) => (
68-
<div
68+
<button
6969
key={`${serviceAccount.namespace}-${serviceAccount.name}`}
70-
className={`p-3 rounded-lg border cursor-pointer transition-all duration-200 ${
70+
className={`p-3 rounded-lg border cursor-pointer transition-all w-full text-left duration-200 ${
7171
selectedIndex === index
7272
? 'bg-cyan-50 border-cyan-200 ring-1 ring-cyan-200 dark:bg-cyan-700 dark:border-cyan-600 dark:ring-cyan-600'
7373
: 'bg-white border-gray-200 hover:bg-gray-50 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600'
@@ -233,7 +233,7 @@ export function ServiceAccountsList({
233233
</div>
234234
</div>
235235
)}
236-
</div>
236+
</button>
237237
))}
238238
</div>
239239
);

src/components/VisualPreview.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,9 +1759,9 @@ export function VisualPreview({
17591759
)}
17601760
</svg>
17611761
{flowNodes.map(node => (
1762-
<div
1762+
<button
17631763
key={node.id}
1764-
className={`absolute w-48 p-3 rounded-lg border-2 shadow-lg select-none cursor-pointer ${
1764+
className={`absolute w-48 p-3 text-left rounded-lg border-2 shadow-lg select-none cursor-pointer ${
17651765
node.colorClass || getStatusColor(node.status)
17661766
}`}
17671767
style={{
@@ -1876,7 +1876,7 @@ export function VisualPreview({
18761876
)}
18771877
</div>
18781878
)}
1879-
</div>
1879+
</button>
18801880
))}
18811881
</div>
18821882
{/* YAML Modal */}

0 commit comments

Comments
 (0)