Files view: widen the change-details modal again and keep the legend on one row
- modal max-width 900px -> 1100px - the legend's swatch and label were separate flex children, so a line break could split them and the three entries wrapped; each pair is now one `.hex-legend-item` (nowrap, no shrink) and the legend itself is `flex-wrap: nowrap` with `overflow-x: auto`, so it stays on a single row - Node test: the modal test now checks the path header and that the legend follows the views as three grouped items - SW cache simtrace-analyser-v70 (cosmetic, no version bump)
This commit is contained in:
1 parent
f13a2aeacd
commit
bd0c9a2c4a
3 files changed
+12
-7
No files matched your search
@@ -466,6 +466,7 @@ eval(
|
||||
test('Change details modal: header, summary, legend and both views', () => {
|
||||
renderFileDiff({
|
||||
name: 'EF_ICCID',
|
||||
path: 'MF/EF_ICCID (2FE2)',
|
||||
op: 'READ BINARY',
|
||||
record: null,
|
||||
n_records: null,
|
||||
@@ -478,7 +479,7 @@ test('Change details modal: header, summary, legend and both views', () => {
|
||||
image_truncated: false,
|
||||
});
|
||||
const sub = el('file-diff-sub').textContent;
|
||||
assert.match(sub, /EF_ICCID — READ BINARY/);
|
||||
assert.match(sub, /MF\/EF_ICCID \(2FE2\) — READ BINARY/);
|
||||
assert.match(sub, /#12/);
|
||||
const body = el('file-diff-body').innerHTML;
|
||||
assert.match(body, /2 bytes changed, 4 bytes newly observed/);
|
||||
@@ -488,6 +489,9 @@ test('Change details modal: header, summary, legend and both views', () => {
|
||||
assert.match(body, /Before/);
|
||||
assert.match(body, /After/);
|
||||
assert.equal((body.match(/class="hex-view"/g) || []).length, 2);
|
||||
// The legend sits below the two views, each swatch bound to its label.
|
||||
assert.ok(body.indexOf('hex-legend') > body.lastIndexOf('hex-view'));
|
||||
assert.equal((body.match(/class="hex-legend-item"/g) || []).length, 3);
|
||||
// The record header variant and the frozen-image note.
|
||||
renderFileDiff({
|
||||
name: 'EF_IMSI', op: 'READ RECORD', record: 2, n_records: 5, index: 40,
|
||||
|
||||
Reference in new issue
Block a user