Skip to content

Commit 17cc84c

Browse files
committed
some comments
1 parent e3740f9 commit 17cc84c

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

special-pages/pages/history/app/components/Header.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ function Controls({ term, range }) {
4646
const title = useComputed(() => (results.value.items.length === 0 ? t('delete_none') : ''));
4747

4848
/**
49-
* The button text should alternate between 'delete' and 'delete all' depending on the
50-
* state of the current query. It should only read 'delete all' when the query is the default one
51-
* and there are no selections
49+
* The button text should be 'delete all', unless there are row selections, then it's just 'delete'
5250
*/
5351
const buttonTxt = useComputed(() => {
5452
const hasSelections = selected.value.size > 0;
@@ -59,8 +57,9 @@ function Controls({ term, range }) {
5957
/**
6058
* Which action should the delete button take?
6159
*
62-
* - if there are selections, they should be deleted
60+
* - if there are selections, they should be deleted by indexes
6361
* - if there's a range selected, that should be deleted
62+
* - if there's a search term, that should be deleted
6463
* - or fallback to deleting all
6564
*/
6665
function onClick() {

special-pages/pages/history/app/components/Header.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
height: 28px;
7575
border-radius: 6px;
7676
border: 0.5px solid var(--history-surface-border-color);
77+
/* these precise numbers help it match figma when overriding default UI */
7778
padding-left: 31px;
7879
padding-right: 9px;
7980
background: inherit;

special-pages/pages/history/app/components/Item.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@
6363
}
6464
}
6565

66+
/**
67+
* The following code handles handles the multi-row selections. It's responsible
68+
* for ensuring only the first and last elements in a selection have rounded corners.
69+
*/
6670
[data-is-selected='true'] .row {
6771
border-radius: 0;
6872
}

0 commit comments

Comments
 (0)