Skip to content

Commit de28f51

Browse files
committed
Remove status indicator
1 parent 47680de commit de28f51

9 files changed

Lines changed: 47 additions & 131 deletions

File tree

AGENTS.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,6 @@ This template provides:
3535

3636
## Key Conventions
3737

38-
### Status Messages
39-
40-
Use these exact status messages for consistency:
41-
42-
- "Ready" - Application loaded successfully
43-
- "Loading..." - Data is being loaded
44-
- "Saving..." - Data is being saved
45-
- "Changes saved" - Auto-save completed successfully
46-
- "Save failed (will retry)" - Server save failed, will retry
47-
- "Failed to load data" - Data loading failed
48-
- "Auto-save initialized" - Auto-save system started
49-
5038
### File Naming
5139

5240
- CSS files: kebab-case (e.g., `my-app.css`)
@@ -95,7 +83,7 @@ npm install
9583
For detailed information about:
9684
- Design System usage and components
9785
- CSS implementation guidelines
98-
- JavaScript API (HelpModal, status management)
86+
- JavaScript API (HelpModal)
9987
- Component reference and examples
10088
- Customization options
10189

@@ -124,7 +112,7 @@ When working on applications built with this template:
124112

125113
1. **Always reference BESPOKE-TEMPLATE.md** for template-specific
126114
implementation details
127-
2. **Follow the conventions** listed above for status messages and file naming
115+
2. **Follow the conventions** listed above for file naming
128116
3. **Use Design System components** directly - see BESPOKE-TEMPLATE.md for
129117
component classes and usage
130118
4. **Maintain consistency** with the template's structure and patterns

BESPOKE-TEMPLATE.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,6 @@ Every application should include these files in the following order:
8484
- content: your help content (string or loaded from file)
8585
- theme: `'auto'`
8686

87-
2. STATUS MANAGEMENT:
88-
a) Use the provided setStatus() function for status updates
89-
b) Update status for: loading, saving, errors, user actions
90-
c) Keep status messages concise and informative
91-
9287
## Error Handling Requirements
9388

9489
1. WRAP all async operations in try-catch blocks
@@ -98,18 +93,6 @@ Every application should include these files in the following order:
9893
5. HANDLE localStorage quota exceeded errors
9994
6. VALIDATE data before saving operations
10095

101-
## Status Message Conventions
102-
103-
Use these EXACT status messages for consistency:
104-
105-
- "Ready" - Application loaded successfully
106-
- "Loading..." - Data is being loaded
107-
- "Saving..." - Data is being saved
108-
- "Changes saved" - Auto-save completed successfully
109-
- "Save failed (will retry)" - Server save failed, will retry
110-
- "Failed to load data" - Data loading failed
111-
- "Auto-save initialized" - Auto-save system started
112-
11396
## File Naming Conventions
11497

11598
1. CSS files: kebab-case (e.g., my-app.css, task-manager.css)
@@ -155,7 +138,6 @@ when the design system adds them.
155138
<div class="bespoke">
156139
<header class="header">
157140
<h1>My App</h1>
158-
<div class="status">Ready</div>
159141
<button class="button button-text">Help</button>
160142
</header>
161143

@@ -188,7 +170,6 @@ when the design system adds them.
188170
```html
189171
<header class="header">
190172
<h1>App Title</h1>
191-
<div class="status">Status message</div>
192173
<button class="button button-text">Help</button>
193174
</header>
194175
```
@@ -394,7 +375,6 @@ between light and dark themes. No additional configuration is needed.
394375
<header class="header">
395376
<h1>DB Schema Designer</h1>
396377
<button id="btn-save" class="button button-primary">Save</button>
397-
<div class="status">Ready</div>
398378
<button class="button button-text">Help</button>
399379
</header>
400380

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This template uses the CodeSignal Design System located in `client/design-system
1414
### 2. `client/bespoke-template.css`
1515
Template-specific CSS providing:
1616
- Layout components (header, sidebar, main-layout)
17-
- Utility classes (row, spacer, status)
17+
- Utility classes (row, spacer)
1818
- Temporary components (modals, form elements) - will be replaced when design system adds them
1919

2020
### 3. `client/index.html`

client/app.js

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
// app.js
22
import Modal from './design-system/components/modal/modal.js';
33

4-
const status = document.getElementById('status');
54
let websocket = null;
65
let helpModal = null;
76

8-
function setStatus(msg) {
9-
if (status) {
10-
status.textContent = msg;
11-
}
12-
}
13-
147
// Initialize WebSocket connection
158
function initializeWebSocket() {
169
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
@@ -22,7 +15,6 @@ function initializeWebSocket() {
2215

2316
websocket.onopen = function(event) {
2417
console.log('WebSocket connected');
25-
setStatus('Ready (WebSocket connected)');
2618
};
2719

2820
websocket.onmessage = function(event) {
@@ -38,8 +30,6 @@ function initializeWebSocket() {
3830

3931
websocket.onclose = function(event) {
4032
console.log('WebSocket disconnected');
41-
setStatus('Ready (WebSocket disconnected)');
42-
4333
// Attempt to reconnect after 3 seconds
4434
setTimeout(() => {
4535
console.log('Attempting to reconnect WebSocket...');
@@ -49,53 +39,39 @@ function initializeWebSocket() {
4939

5040
websocket.onerror = function(error) {
5141
console.error('WebSocket error:', error);
52-
setStatus('Ready (WebSocket error)');
5342
};
54-
5543
} catch (error) {
5644
console.error('Failed to create WebSocket connection:', error);
57-
setStatus('Ready (WebSocket unavailable)');
5845
}
5946
}
6047

6148
// Load help content and initialize modal
6249
async function initializeHelpModal() {
6350
try {
64-
const response = await fetch('./help-content-template.html');
51+
const response = await fetch('./help-content.html');
6552
const helpContent = await response.text();
6653

67-
// Create help modal with actual content
6854
helpModal = Modal.createHelpModal({
6955
title: 'Help / User Guide',
7056
content: helpContent
7157
});
7258

73-
// Bind help button click handler
7459
const helpButton = document.getElementById('btn-help');
7560
if (helpButton) {
7661
helpButton.addEventListener('click', () => {
7762
helpModal.open();
7863
});
7964
}
80-
81-
setStatus('Ready');
8265
} catch (error) {
8366
console.error('Failed to load help content:', error);
84-
// Fallback to placeholder content
8567
helpModal = Modal.createHelpModal({
8668
title: 'Help / User Guide',
87-
content: '<p>Help content could not be loaded. Please check that help-content-template.html exists.</p>'
69+
content: '<p>Help content could not be loaded. Please check that help-content.html exists.</p>'
8870
});
89-
90-
// Bind help button click handler
9171
const helpButton = document.getElementById('btn-help');
9272
if (helpButton) {
93-
helpButton.addEventListener('click', () => {
94-
helpModal.open();
95-
});
73+
helpButton.addEventListener('click', () => helpModal.open());
9674
}
97-
98-
setStatus('Ready (help content unavailable)');
9975
}
10076
}
10177

client/bespoke-template.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@
3737
color: var(--Colors-Text-Body-Strongest);
3838
}
3939

40-
.bespoke .header .status {
41-
font-size: var(--Fonts-Body-Default-xs);
42-
color: var(--Colors-Text-Body-Medium);
43-
}
44-
4540
/* Main Layout */
4641
.bespoke .main-layout {
4742
display: grid;

client/example-app/example-app.js

Lines changed: 40 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,15 @@
33

44
import Modal from '../design-system/components/modal/modal.js';
55

6-
const status = document.getElementById('status');
7-
86
// App state
97
let counterValue = 0;
108
let incrementAmount = 1;
119
let counterLabel = 'Counter';
1210
let dropdownInstance = null;
1311
let helpModal = null;
1412

15-
function setStatus(msg) {
16-
if (status) {
17-
status.textContent = msg;
18-
}
19-
}
20-
21-
// Update counter display
22-
function updateCounterDisplay() {
13+
// Update counter display
14+
function updateCounterDisplay() {
2315
const counterDisplay = document.getElementById('counter-value');
2416
const labelDisplay = document.getElementById('display-label');
2517
const labelValueDisplay = document.getElementById('display-label-value');
@@ -43,10 +35,10 @@ let helpModal = null;
4335

4436
// Update status tags
4537
updateStatusTags();
46-
}
38+
}
4739

48-
// Update status tags based on counter value
49-
function updateStatusTags() {
40+
// Update status tags based on counter value
41+
function updateStatusTags() {
5042
const primaryTag = document.getElementById('status-tag-primary');
5143
const positiveTag = document.getElementById('status-tag-positive');
5244
const negativeTag = document.getElementById('status-tag-negative');
@@ -64,31 +56,28 @@ let helpModal = null;
6456
if (positiveTag) positiveTag.style.display = 'none';
6557
if (negativeTag) negativeTag.style.display = 'none';
6658
}
67-
}
59+
}
6860

69-
// Increment counter
70-
function incrementCounter() {
61+
// Increment counter
62+
function incrementCounter() {
7163
counterValue += incrementAmount;
7264
updateCounterDisplay();
73-
setStatus('Counter incremented');
74-
}
65+
}
7566

76-
// Decrement counter
77-
function decrementCounter() {
67+
// Decrement counter
68+
function decrementCounter() {
7869
counterValue -= incrementAmount;
7970
updateCounterDisplay();
80-
setStatus('Counter decremented');
81-
}
71+
}
8272

83-
// Reset counter
84-
function resetCounter() {
73+
// Reset counter
74+
function resetCounter() {
8575
counterValue = 0;
8676
updateCounterDisplay();
87-
setStatus('Counter reset');
88-
}
77+
}
8978

90-
// Initialize dropdown component
91-
function initializeDropdown() {
79+
// Initialize dropdown component
80+
function initializeDropdown() {
9281
if (typeof window.Dropdown === 'undefined') {
9382
console.error('Dropdown class not found. Make sure dropdown.js is loaded.');
9483
return;
@@ -109,16 +98,15 @@ let helpModal = null;
10998
onSelect: (value) => {
11099
incrementAmount = parseInt(value, 10);
111100
updateCounterDisplay();
112-
setStatus(`Increment amount set to ${incrementAmount}`);
113101
}
114102
});
115103
} catch (error) {
116104
console.error('Error initializing dropdown:', error);
117105
}
118-
}
106+
}
119107

120-
// Initialize event listeners
121-
function initializeEventListeners() {
108+
// Initialize event listeners
109+
function initializeEventListeners() {
122110
// Sidebar controls
123111
const btnIncrement = document.getElementById('btn-increment');
124112
const btnDecrement = document.getElementById('btn-decrement');
@@ -145,13 +133,12 @@ let helpModal = null;
145133
counterLabelInput.addEventListener('input', (e) => {
146134
counterLabel = e.target.value || 'Counter';
147135
updateCounterDisplay();
148-
setStatus('Label updated');
149136
});
150137
}
151-
}
138+
}
152139

153-
// Initialize help modal
154-
async function initializeHelpModal() {
140+
// Initialize help modal
141+
async function initializeHelpModal() {
155142
try {
156143
const response = await fetch('./help-content.html');
157144
const helpContent = await response.text();
@@ -185,28 +172,20 @@ let helpModal = null;
185172
});
186173
}
187174
}
188-
}
189-
190-
// Initialize everything when DOM is ready
191-
async function initialize() {
192-
setStatus('Loading...');
193-
194-
// Initialize event listeners
195-
initializeEventListeners();
196-
197-
// Initialize help modal
198-
await initializeHelpModal();
199-
200-
// Initialize dropdown after a short delay to ensure Dropdown class is loaded
201-
setTimeout(() => {
202-
initializeDropdown();
203-
updateCounterDisplay();
204-
setStatus('Ready');
205-
}, 100);
206-
}
207-
208-
if (document.readyState === 'loading') {
209-
document.addEventListener('DOMContentLoaded', initialize);
210-
} else {
211-
initialize();
212-
}
175+
}
176+
177+
// Initialize everything when DOM is ready
178+
async function initialize() {
179+
initializeEventListeners();
180+
await initializeHelpModal();
181+
setTimeout(() => {
182+
initializeDropdown();
183+
updateCounterDisplay();
184+
}, 100);
185+
}
186+
187+
if (document.readyState === 'loading') {
188+
document.addEventListener('DOMContentLoaded', initialize);
189+
} else {
190+
initialize();
191+
}

client/example-app/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
<header class="header">
3232
<h1>Component Showcase</h1>
3333
<div class="spacer"></div>
34-
<div id="status" class="status">Ready</div>
3534
<button id="btn-help" class="button button-text">Help</button>
3635
</header>
3736

client/help-content.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ <h2>Troubleshooting / FAQ</h2>
112112

113113
<details>
114114
<summary>Is my work automatically saved?</summary>
115-
<p>Yes, the app automatically saves your work. You'll see status messages indicating when saves occur.</p>
115+
<p>Yes, the app saves your work automatically in the background.</p>
116116
</details>
117117
</section>
118118

client/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
<h1>APP NAME</h1>
3333
<!-- APP_SPECIFIC_HEADER_CONTENT -->
3434
<div class="spacer"></div>
35-
<div id="status" class="status">Ready</div>
3635
<button id="btn-help" class="button button-text">Help</button>
3736
</header>
3837

0 commit comments

Comments
 (0)