Skip to content

Commit

Permalink
Clarify UI strings are button labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mattzeunert committed Jan 15, 2019
1 parent df8f86c commit 638ebda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lighthouse-core/report/html/renderer/code-snippet-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class CodeSnippetRenderer {
const header = dom.cloneTemplate('#tmpl-lh-code-snippet__header', tmpl);
dom.find('.lh-code-snippet__title', header).textContent = title;

const {codeSnippetCollapse, codeSnippetExpand} = Util.UIStrings;
dom.find('.' + SHOW_IF_EXPANDED_CLASS, header).textContent = codeSnippetCollapse;
dom.find('.' + SHOW_IF_COLLAPSED_CLASS, header).textContent = codeSnippetExpand;
const {codeSnippetCollapseBtnLabel, codeSnippetExpandBtnLabel} = Util.UIStrings;
dom.find('.' + SHOW_IF_EXPANDED_CLASS, header).textContent = codeSnippetCollapseBtnLabel;
dom.find('.' + SHOW_IF_COLLAPSED_CLASS, header).textContent = codeSnippetExpandBtnLabel;

const toggleExpandButton = dom.find('.lh-code-snippet__toggle-expand', header);
// If we're already showing all the lines of the snippet, we don't need an expand/collapse
Expand Down
4 changes: 2 additions & 2 deletions lighthouse-core/report/html/renderer/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,9 @@ Util.UIStrings = {
crcLongestDurationLabel: 'Maximum critical path latency:',

/** Label for button that shows all lines of the code snippet when clicked */
codeSnippetExpand: 'Expand snippet',
codeSnippetExpandBtnLabel: 'Expand snippet',
/** Label for button that only shows a few lines of the code snippet when clicked */
codeSnippetCollapse: 'Collapse snippet',
codeSnippetCollapseBtnLabel: 'Collapse snippet',

/** Explanation shown to users below performance results to inform them that the test was done with a 4G network connection and to warn them that the numbers they see will likely change slightly the next time they run Lighthouse. 'Lighthouse' becomes link text to additional documentation. */
lsPerformanceCategoryDescription: '[Lighthouse](https://developers.google.com/web/tools/lighthouse/) analysis of the current page on an emulated mobile network. Values are estimated and may vary.',
Expand Down

0 comments on commit 638ebda

Please sign in to comment.