Skip to content

Commit

Permalink
Merge pull request #3181 from github/nora/adjust-log-messages
Browse files Browse the repository at this point in the history
Remove ambiguity from 'View logs' messages
  • Loading branch information
norascheuch authored Jan 3, 2024
2 parents b27d8a1 + cfbc443 commit 8daf337
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class OutputChannelLogger
message: string,
show: (message: string, ...items: string[]) => Thenable<string | undefined>,
): Promise<void> {
const label = "Show Log";
const label = "View extension logs";
const result = await show(message, label);

if (result === label) {
Expand Down
6 changes: 3 additions & 3 deletions extensions/ql-vscode/src/stories/common/Alert.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ ErrorExample.args = {
<>
Request to
https://api.github.com/repos/octodemo/Hello-World/code-scanning/codeql/queries
failed. <VSCodeLink>Check logs</VSCodeLink> and try running this query
again.
failed. <VSCodeLink>View actions logs</VSCodeLink> and try running this
query again.
</>
),
};
Expand All @@ -84,7 +84,7 @@ ErrorWithButtons.args = {
"Request to https://api.github.com/repos/octodemo/Hello-World/code-scanning/codeql/queries failed. Try running this query again.",
actions: (
<>
<VSCodeButton appearance="secondary">View logs</VSCodeButton>
<VSCodeButton appearance="secondary">View actions logs</VSCodeButton>
<VSCodeButton>Retry</VSCodeButton>
</>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const getMessage = (failureReason: VariantAnalysisFailureReason): ReactNode => {
return (
<>
The GitHub Actions workflow run has failed.{" "}
<VSCodeLink onClick={openLogs}>Check logs</VSCodeLink> and try running
this query again.
<VSCodeLink onClick={openLogs}>View actions logs</VSCodeLink> and try
running this query again.
</>
);
case VariantAnalysisFailureReason.InternalError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const VariantAnalysisStatusStats = ({
<span>{completedAt !== undefined ? formatDate(completedAt) : "-"}</span>
)}
{onViewLogsClick && (
<VSCodeLink onClick={onViewLogsClick}>View logs</VSCodeLink>
<VSCodeLink onClick={onViewLogsClick}>View actions logs</VSCodeLink>
)}
</Container>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe(VariantAnalysisStats.name, () => {
completedAt: new Date(),
});

await userEvent.click(screen.getByText("View logs"));
await userEvent.click(screen.getByText("View actions logs"));
expect(onViewLogsClick).toHaveBeenCalledTimes(1);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe(VariantAnalysisStatusStats.name, () => {
onViewLogsClick: () => undefined,
});

expect(screen.getByText("View logs")).toBeInTheDocument();
expect(screen.getByText("View actions logs")).toBeInTheDocument();
});

it("renders when there isn't a viewLogs links", () => {
Expand All @@ -62,6 +62,6 @@ describe(VariantAnalysisStatusStats.name, () => {
onViewLogsClick: undefined,
});

expect(screen.queryByText("View logs")).not.toBeInTheDocument();
expect(screen.queryByText("View actions logs")).not.toBeInTheDocument();
});
});

0 comments on commit 8daf337

Please sign in to comment.