Skip to content

Feature/signal value format registry - #697

Open
desmonddak wants to merge 4 commits into
intel:mainfrom
desmonddak:feature/signal-value-format-registry
Open

Feature/signal value format registry#697
desmonddak wants to merge 4 commits into
intel:mainfrom
desmonddak:feature/signal-value-format-registry

Conversation

@desmonddak

@desmonddak desmonddak commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description & Motivation

This is a dependency needed as central for widgets to communicate changes in the way a signal value is displayed.

Related Issue(s)

None.

Testing

This feature is used in future widgets where testing is performed, but not introduced yet. But basic testing for store/recall of format is performed.

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

No.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

No, not yet. This is a narrow dependency needed to introduce future widgets.

import 'package:rohd_devtools_widgets/rohd_devtools_widgets.dart';

void main() {
test('formats bare binary and hexadecimal waveform values', () {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some of these are surprising to me. How does it know 11111111 is binary and not decimal or hex? how does it know ff is hex?

import 'package:rohd_devtools_widgets/rohd_devtools_widgets.dart';

void main() {
test('formats bare binary and hexadecimal waveform values', () {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some of these are surprising to me. How does it know 11111111 is binary and not decimal or hex? how does it know ff is hex?

SignalValueFormatRegistry._();

/// Current occurrence-format preferences.
static final formats = ValueNotifier<Map<String, String>>(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why aren't we using enums for the different supported types?

);
});

test('looks up a uniquely matching hierarchy suffix', () {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm confused why these non-matching things should match? it always matches any suffix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants