Highlight viewed files differently in the PR filetree#24956
Conversation
|
Maybe the files should have a blue color to keep consistent with the checkbox color on the right column. |
I would add a Maybe we need to also expand the width of the sidebar by 16px or more to accomodate this additional icon. |
|
@silverwind see also #24566 (comment) … |
|
The file icon is not completely useless because symlink should show differently. But yes, we can use it for this checkmark icon too, to conserve space. |
There was a problem hiding this comment.
Can files be made a Set? There can never be duplicates in the file paths. Also I think files is not a good name, maybe viewedFiles, assuming it's there only to tracked viewed files?
There was a problem hiding this comment.
It's not only a tracker of the viewed files - it's the list of all files shown in the diff.
There was a problem hiding this comment.
Ok, still could be made a Set then, to make existance checks O(1) instead of O(n).
Follow #21012, #22399 Replace #24983, fix #24938 Help #24956 Now, the `window.config.pageData.diffFileInfo` itself is a reactive store, so it's quite easy to sync values/states by it, no need to do "doLoadMoreFiles" or "callback". Screenshot: these two buttons both work. After complete loading, the UI is also right. <details>    </details>
|
Now that #24998 is in, this needs a few adoptions. |
3d79f82 to
d299564
Compare
|
Ping, does it get stale? |
Sorry - will add the changes and test it now. |
…le_viewed_status_in_tree
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
All changes applied - ready to review. |
|
I think there is better way to indicate the viewed files on the left tree but let's merge this one and expect another PR to do that. |
fixes #24566