Skip to content

Add run options str - #795

Open
sonic16x wants to merge 1 commit into
masterfrom
run-options-str
Open

Add run options str#795
sonic16x wants to merge 1 commit into
masterfrom
run-options-str

Conversation

@sonic16x

@sonic16x sonic16x commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-08-06 at 15 25 33 Screenshot 2026-08-06 at 15 25 43 Screenshot 2026-08-06 at 15 25 55

@pkg-pr-new

pkg-pr-new Bot commented Aug 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/html-reporter@795

commit: 3a4f949

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

✅ Component tests succeed

Report

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

✅ E2E tests succeed

Report

return {...state, repeatLeft: action.payload.repeatLeft};
}
case actionNames.SET_RUN_OPTIONS: {
console.log('DEBUG payload', action.payload.runOptions);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

debug logging

export const runTest = (): RunTestAction => ({type: actionNames.RETRY_TEST});
export const setRepeatCount = (repeatCount: number): Action<typeof actionNames.SET_REPEAT_COUNT, {repeatCount: number}> => ({type: actionNames.SET_REPEAT_COUNT, payload: {repeatCount}});
export const setRepeatLeft = (repeatLeft: number): Action<typeof actionNames.SET_REPEAT_LEFT, {repeatLeft: number}> => ({type: actionNames.SET_REPEAT_LEFT, payload: {repeatLeft}});
export const setRunOptions = (runOptions: RunOptions): Action<typeof actionNames.SET_RUN_OPTIONS, {runOptions: RunOptions}> => ({type: actionNames.SET_RUN_OPTIONS, payload: {runOptions}});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmmm, so with this action, every time someone wants to update options, it's first needed to get them, merge and update. What if we had something like this:

type RunOptions = Record<string, string[]>;

const setRunOptions = (namespace: string, options: string[]) => /* ... */

This would allow consumers to conveniently update only parts of the state they care about. And having an array instead of string | null allows to both avoid dealing with nulls and have multiple values just in case.

What do you think?

const opts: string[] = [];

if (state.repeatCount > 1) {
opts.push(`x${state.repeatCount}`);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's use the \times symbol here as well: ×

}
});

return opts.join('⋅');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: maybe let's add spaces around the dot? but that's up to you

@shadowusr

Copy link
Copy Markdown
Member

Also, forgot to mention, let's make the text on the run button slightly brighter. I think we can change opacity from 0.5 to 0.7.

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