Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple settings being defined in *-commands.csv #1125

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

howard-e
Copy link
Contributor

@howard-e howard-e commented Sep 3, 2024

@howard-e
Copy link
Contributor Author

howard-e commented Sep 3, 2024

cc @mcking65

) {
const commandInfo = {
testId: command.testId,
command: command.command,
settings: command.settings || 'defaultMode',
settings: primarySetting,
Copy link
Contributor

Choose a reason for hiding this comment

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

This definition of settings isn't really appropriate in the presence of additionalSettings. Will this change also be reflected in the test format definition? What would be the ramifications of renaming this property to primarySetting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This definition of settings isn't really appropriate in the presence of additionalSettings ... renaming this property to primarySetting?

I agree! I figured as much when sharing the initial gist on what's different here. I proposed mainSetting then and have since used primarySetting here as well which feels more appropriate. Otherwise, it certainly presents a bit of confusion without this context.

Will this change also be reflected in the test format definition?

I don't think it necessary. Seems to be something to consider as an implementation detail.

What would be the ramifications ...

A widespread refactor across the references in this repository, aria-at-app (as well as some migration or backward compatibility work) and also in aria-at-automation-harness and related resources I assume. That will certainly need a bit of coordination that I'm uneasy trying to get that done now. Do you feel strongly otherwise?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that it's an implementation detail for the Community Group at large. That said, the amount of inter-project coordination needed to support change makes it feel like a public-facing design.

This change creates a gap between what the CG calls "settings" and what code maintainers call "settings", and to me, that's a problem which is distinct from the internally inconsistent names.

I dropped in from w3c/aria-at-automation-harness#73 to verify that my understanding of the situation was accurate. I trust your judgement when it comes to coordinating changes; I'd only advocate for prioritizing that refactoring sooner rather than later!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jugglinmike @outofambit having come back to this now, I've walked back on this implementation approach of "additionalSettings". Rather, sticking to handling the space separated string of "settings" as it is. My introducing "additional" settings represents another sense of settings priority that doesn't necessarily reflect the intention of #1002 (comment).

This change creates a gap between what the CG calls "settings" and what code maintainers call "settings", and to me, that's a problem which is distinct from the internally inconsistent names.

Fair point! I also started #1180 which I hope brings us to a "v1.5-esque" change where we can remove a lot of unneeded code, references which haven't been relevant for some time and further help standardize the language between the maintainers and the CG.

Copy link
Contributor

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

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

Looks great! I reviewed locally and tested making changes. The additional settings render as expected. Left a few comments inline but nothing blocking. Thanks Howard!

// TODO: Account for a list of settings as described by https://github.com/w3c/aria-at/wiki/Test-Format-Definition-V2#settings
const settingsValue = command.settings || 'defaultMode';
const [primarySetting, ...additionalSettings] = command.settings
? command.settings.split(' ')
Copy link
Contributor

Choose a reason for hiding this comment

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

This structure with the primary setting as the first item in a space-separated collection feels a bit fragile. I'd rather have this as a distinct column. It feels like there is significance not surfaced by a quick read of the input. I assume that this is a design decision towards a better authoring experience so I support leaving as-is for now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Relevant to my reply here, I agree with that point. I've reverted this approach

tests/resources/aria-at-test-io-format.mjs Show resolved Hide resolved
tests/resources/aria-at-test-io-format.mjs Outdated Show resolved Hide resolved
tests/resources/aria-at-test-run.mjs Outdated Show resolved Hide resolved
screenTextRender = `${screenTextRender} and ${settingsText}`;
});
}
screenTextRender = `${screenTextRender})`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could also possibly be combined with the similar code above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been changed slightly. Do you still feel the same here?

@howard-e howard-e marked this pull request as draft January 29, 2025 21:31
@howard-e howard-e marked this pull request as ready for review February 3, 2025 15:43
@howard-e howard-e requested a review from stalgiag February 3, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants