Repository navigation
Harder better faster stronger new-or-deleted-file - #6702
Conversation
| - [](# "mark-merge-commits-in-list") [Marks merge commits in commit lists.](https://user-images.githubusercontent.com/16872793/75561016-457eb900-5a14-11ea-95e1-a89e81ee7390.png) | ||
| - [](# "deep-reblame") [When exploring blames, `Alt`-clicking the “Reblame” buttons will extract the associated PR’s commits first, instead of treating the commit a single change.](https://user-images.githubusercontent.com/16872793/77248541-8e3f2180-6c10-11ea-91d4-221ccc0ecebb.png) | ||
| - [](# "highlight-deleted-and-added-files-in-diffs") [Indicates with an icon whether files in commits and pull requests being added or removed.](https://user-images.githubusercontent.com/1402241/90332474-23262b00-dfb5-11ea-9a03-8fd676ea0fdd.png) | ||
| - [](# "new-or-deleted-file") [Indicates with an icon whether files in commits and pull requests being added or removed.](https://user-images.githubusercontent.com/1402241/90332474-23262b00-dfb5-11ea-9a03-8fd676ea0fdd.png) |
There was a problem hiding this comment.
Hmm, I don't find it as clear as the old one. Maybe new-or-deleted-file-diff-indicator?
There was a problem hiding this comment.
Feature names should no longer be fully descriptive, I'm only renaming long feature names because they're impossible to mention in commits or to remember. See also the other recent renames in options-storage
There was a problem hiding this comment.
Still think that we should include the word highlight
There was a problem hiding this comment.
Then we're back to square one: highlight-new-or-delete-file is 5-words long and I don’t think it helps much;. The feature search also includes the description so we can always try to add more keywords there (but it already includes the word indicates, like github-actions-indicators does)
There was a problem hiding this comment.
I agree that the new name isn't very descriptive, but between descriptiveness and brevity we should prefer the latter, as described in #6707.
Alternative short names are welcome; names that are only slightly shorter than what we have aren't enough.
There was a problem hiding this comment.
While that sounds correct, it gives me even less information about what the indicator is about. "diff type" == ?
Maybe mark-new-or-deleted-file but that's so long too.
|
|
||
| const icon = select('.octicon-diff-removed, .octicon-diff-added', fileInList) | ||
| ?.cloneNode(true); | ||
| if (icon) { |
There was a problem hiding this comment.
I added a bunch of conditions to have clear errors in case filelists are deferred in big PRs. I can drop the features.log.error condition if anyone finds one such big PR
| import observe from '../helpers/selector-observer.js'; | ||
|
|
||
| function add(filename: HTMLAnchorElement): void { | ||
| const list = select('ul[aria-label="File Tree"]'); |
There was a problem hiding this comment.
This feature used to use this dropdown:
but it only appears on PRs and it's actually been relegated to small screens, because the whole dropdown is hidden/duplicate of the sidebar on large screens.
It seems that the sidebar is actually part of the original HTML, so we don't even need to wait for it to load (at least some times)
There was a problem hiding this comment.
I ended up not using the API because I figured we'd still have trouble figuring out the exact changes/api to consider in case of single commits and multi-PR-commits. The sidebar is recent enough, hopefully it will last a while.
highlight-deleted-and-added-files-in-diffsbroken on single commits #6678Test URLs
Commit: refined-github/sandbox@a00694f
PR: https://github.com/refined-github/sandbox/pull/71/files
PR with CODEOWNERS: https://github.com/dotnet/winforms/pull/6028/files
Note: Not possible with 1-file commits: refined-github/sandbox@1ed862e
PR
Commit