Skip to content

Commit d645549

Browse files
felixwidjajaclaude
andcommitted
Fix mobile UX: add search to sidebar and fix submission flow
- Add mobile-only search input in the sidebar (above categories) so search is visible on first load without scrolling; hide the top-bar search on mobile since it falls below the fold - Replace URLSearchParams with encodeURIComponent in the submission form so spaces encode as %20 rather than +, fixing blank issue bodies in the GitHub mobile app - Disable and label the Submit button on click to prevent confusion from multiple taps; re-enable after 4s if the user navigates back Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2be00f5 commit d645549

File tree

2 files changed

+42
-8
lines changed

2 files changed

+42
-8
lines changed

docs/index.html

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@
178178
flex: 0 1 300px;
179179
}
180180

181+
.mobile-search-wrapper {
182+
display: none;
183+
}
184+
181185
.search-input {
182186
width: 100%;
183187
padding: 0.5rem 0.875rem 0.5rem 2.25rem;
@@ -888,9 +892,13 @@
888892
justify-content: space-between;
889893
}
890894

891-
.search-box {
892-
flex: none;
893-
width: 100%;
895+
.top-bar .search-box {
896+
display: none;
897+
}
898+
899+
.mobile-search-wrapper {
900+
display: block;
901+
margin-bottom: 0.75rem;
894902
}
895903

896904
.modal {
@@ -929,6 +937,20 @@ <h1>Awesome Alt Clouds</h1>
929937
<p class="subtitle">Discover specialized infrastructure providers built for developers who think different</p>
930938
</div>
931939

940+
<div class="mobile-search-wrapper">
941+
<div class="search-box">
942+
<svg class="search-icon" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24">
943+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
944+
</svg>
945+
<input
946+
type="text"
947+
class="search-input"
948+
id="searchInputMobile"
949+
placeholder="Search clouds..."
950+
>
951+
</div>
952+
</div>
953+
932954
<div class="categories-section">
933955
<div class="section-title">Categories</div>
934956
<div class="category-list" id="categoryList">
@@ -1393,6 +1415,11 @@ <h4 class="resource-card-title">
13931415
renderClouds();
13941416
});
13951417

1418+
document.getElementById('searchInputMobile').addEventListener('input', (e) => {
1419+
searchTerm = e.target.value;
1420+
renderClouds();
1421+
});
1422+
13961423
// Initialize on page load
13971424
loadClouds();
13981425
</script>

docs/submit/index.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,21 @@ <h2>Thanks for expanding the atlas!</h2>
467467
*This issue was automatically created via the submission form. A GitHub Action will evaluate each service and use AI to generate name, description, and category. Services that pass (2/3 or 3/3 criteria) will be added to a PR.*`;
468468

469469
const issueUrl = `https://github.com/${GITHUB_OWNER}/${GITHUB_REPO}/issues/new?` +
470-
new URLSearchParams({
471-
title: issueTitle,
472-
body: issueBody,
473-
labels: 'submission'
474-
}).toString();
470+
`title=${encodeURIComponent(issueTitle)}&body=${encodeURIComponent(issueBody)}&labels=submission`;
471+
472+
// Disable button to prevent double-submission and show feedback
473+
const btn = document.getElementById('submit-btn');
474+
btn.disabled = true;
475+
btn.textContent = 'Opening GitHub…';
475476

476477
// Redirect to GitHub to create the issue
477478
window.location.href = issueUrl;
479+
480+
// Re-enable in case the user navigates back
481+
setTimeout(() => {
482+
btn.disabled = false;
483+
btn.textContent = 'Submit for Review';
484+
}, 4000);
478485
});
479486

480487
function extractDomain(url) {

0 commit comments

Comments
 (0)