Skip to content

Commit 5f1211d

Browse files
committed
[IMP] UI fix on parsed data
1 parent 41cb35a commit 5f1211d

3 files changed

Lines changed: 39 additions & 21 deletions

File tree

spp_event_spec_loader/UI_GUIDE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,13 @@
118118

119119
---
120120

121-
## Tab 3: Parsed Data (JSON View)
121+
## Tab 3: Parsed Data (JSON View - Full Width)
122122

123123
```
124124
┌─────────────────────────────────────────────────────────────────┐
125125
│ YAML Specification Program Metadata [Parsed Data] Errors │
126126
├─────────────────────────────────────────────────────────────────┤
127+
│ │
127128
│ 1 { │
128129
│ 2 "program": { │
129130
│ 3 "name": "Pantawid Pamilyang Pilipino Program (4Ps)", │
@@ -141,17 +142,21 @@
141142
│15 "id": "DepEd", │
142143
│ ... │
143144
│ │
145+
│ ← Full width JSON viewer, uses entire available space → │
146+
│ │
144147
│ [Syntax: JSON] [▼] │
145148
└─────────────────────────────────────────────────────────────────┘
146149
```
147150

148151
**Features:**
149152

153+
- ✅ Full-width JSON viewer (uses entire page width)
150154
- ✅ JSON representation of parsed YAML
151155
- ✅ Syntax highlighting
152156
- ✅ Formatted/indented
153157
- ✅ Read-only
154158
- ✅ Useful for debugging
159+
- ✅ Better visibility for complex nested structures
155160

156161
---
157162

spp_event_spec_loader/UI_IMPROVEMENTS.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Tabs: [YAML Specification] [Program Metadata] [Parsed Data] [Errors]
2424

2525
---
2626

27-
### Issue #2: YAML Editor Not Using Full Width ✅
27+
### Issue #2: Editors Not Using Full Width ✅
2828

29-
**Problem**: YAML editor was constrained within a group, not using available space
29+
**Problem**: YAML editor and Parsed Data viewer were constrained within groups, not using available space
3030

31-
**Solution**: Removed constraining group wrapper, allowing ACE editor to expand to full width
31+
**Solution**: Removed constraining group wrappers, allowing ACE editors to expand to full width
3232

3333
**Before**:
3434

@@ -43,6 +43,7 @@ Tabs: [YAML Specification] [Program Metadata] [Parsed Data] [Errors]
4343
**After**:
4444

4545
```xml
46+
<!-- YAML Specification Tab -->
4647
<page name="yaml_spec">
4748
<group>
4849
<group colspan="2">
@@ -53,6 +54,12 @@ Tabs: [YAML Specification] [Program Metadata] [Parsed Data] [Errors]
5354
<field name="yaml_content" widget="ace" nolabel="1" />
5455
↑ No wrapping group - uses full width
5556
</page>
57+
58+
<!-- Parsed Data Tab -->
59+
<page name="parsed_data">
60+
<field name="spec_data" widget="ace" nolabel="1" />
61+
↑ No wrapping group - uses full width
62+
</page>
5663
```
5764

5865
---
@@ -99,9 +106,10 @@ Tabs: [YAML Specification] [Program Metadata] [Parsed Data] [Errors]
99106
### 2. Better Space Utilization
100107

101108
- ✅ YAML editor expands to full width
102-
- ✅ More visible code
109+
- ✅ Parsed Data viewer expands to full width
110+
- ✅ More visible code/JSON
103111
- ✅ Less horizontal scrolling
104-
- ✅ Better for large YAML files
112+
- ✅ Better for large YAML files and complex JSON structures
105113

106114
### 3. Improved User Experience
107115

@@ -119,7 +127,7 @@ Tabs: [YAML Specification] [Program Metadata] [Parsed Data] [Errors]
119127

120128
1. **Removed**: Separate "Upload YAML" tab
121129
2. **Integrated**: File upload into YAML Specification tab
122-
3. **Restructured**: Layout to allow full-width editor
130+
3. **Restructured**: Layout to allow full-width editors (YAML and Parsed Data)
123131

124132
```xml
125133
<!-- NEW STRUCTURE -->
@@ -143,8 +151,9 @@ Tabs: [YAML Specification] [Program Metadata] [Parsed Data] [Errors]
143151
### Key Changes:
144152

145153
- `colspan="2"` on upload field group → stretches across available space
146-
- No wrapping `<group>` around ACE editor → allows full expansion
147-
- `nolabel="1"` on editor → no label = more space for content
154+
- No wrapping `<group>` around YAML ACE editor → allows full expansion
155+
- No wrapping `<group>` around Parsed Data ACE viewer → allows full expansion
156+
- `nolabel="1"` on editors → no label = more space for content
148157
- `separator` → visual distinction between upload and editor
149158

150159
---
@@ -206,6 +215,7 @@ Tested scenarios:
206215
- ✅ Manual entry without upload → works
207216
- ✅ Upload then edit → works
208217
- ✅ Large YAML files → full width utilized
218+
- ✅ Parsed Data tab → full width JSON display
209219
- ✅ Validate button → works
210220
- ✅ Export button → works
211221
- ✅ All tabs still accessible
@@ -268,16 +278,21 @@ Tab: YAML Specification
268278

269279
**Feedback 2**: "Yaml Specifications are not using the entire block inside the page"
270280

271-
- **Fixed**: Removed constraining wrappers, editor now full-width
281+
- **Fixed**: Removed constraining wrappers, YAML editor now full-width
282+
283+
**Feedback 3**: "Do the same for the parsed data on UI"
284+
285+
- **Fixed**: Removed constraining wrapper, Parsed Data viewer now full-width
272286

273287
---
274288

275289
## Summary
276290

277-
Two simple but impactful UI improvements that significantly enhance user experience:
291+
Three simple but impactful UI improvements that significantly enhance user experience:
278292

279293
1. **Integrated Upload**: Reduced navigation complexity
280-
2. **Full-Width Editor**: Better space utilization
294+
2. **Full-Width YAML Editor**: Better space utilization for editing
295+
3. **Full-Width Parsed Data Viewer**: Better space utilization for reviewing JSON
281296

282297
**Result**: Cleaner, more efficient, more professional interface! 🎉
283298

spp_event_spec_loader/views/program_spec_view.xml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,13 @@
110110
</group>
111111
</page>
112112
<page name="parsed_data" string="Parsed Data">
113-
<group>
114-
<field
115-
name="spec_data"
116-
widget="ace"
117-
options="{'mode': 'json'}"
118-
nolabel="1"
119-
readonly="1"
120-
/>
121-
</group>
113+
<field
114+
name="spec_data"
115+
widget="ace"
116+
options="{'mode': 'json'}"
117+
nolabel="1"
118+
readonly="1"
119+
/>
122120
</page>
123121
<page name="errors" string="Errors" invisible="not error_message">
124122
<group>

0 commit comments

Comments
 (0)