Skip to content

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

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

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?

Copy link
Contributor

@stalgiag stalgiag Feb 6, 2025

Choose a reason for hiding this comment

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

I don't feel strongly but I am looking at those lines that are identical and wondering if a getScreenTextRender() might replace them

const hasScreenText = settingsText && settings !== 'defaultMode';
const hasadditionalSettings = hasScreenText && additionalSettingsExpanded.length > 0;

let screenTextRender = hasScreenText ? ` (${settingsText}` : '';
if (hasadditionalSettings) {
      additionalSettingsExpanded.forEach(({ settingsText }) => {
        screenTextRender = `${screenTextRender} and ${settingsText}`;
      });
    }
screenTextRender = `${screenTextRender})`;

Copy link
Contributor Author

@howard-e howard-e Feb 10, 2025

Choose a reason for hiding this comment

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

Done in d3e5b14.

Note I: That snippet posted above was changed as well since I've dropped the "additional settings" concept but the reusable utilities is definitely the direction to go for a lot of this file.
Note II: Also planning to bring wider changes to promote more reusability and clean up through #1180.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh! My apologies. Thanks for addressing even though it was outdated haha! 😅

@howard-e howard-e marked this pull request as draft January 29, 2025 21:31
howard-e added a commit to w3c/aria-at-app that referenced this pull request Feb 10, 2025
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.

Thanks for taking the time to rework this is! I agree with the decisions made here and have confirmed this continues to work as expected.

howard-e and others added 2 commits May 6, 2025 18:08
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.

5 participants