-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlight viewed files differently in the PR filetree #24956
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. |
web_src/js/modules/stores.js
Outdated
diffEnd: 0, | ||
link: '', | ||
isLoadingNewData: false, | ||
files: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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> ![image](https://github.com/go-gitea/gitea/assets/2114189/cc6310fd-7f27-45ea-ab4f-24952a87b421) ![image](https://github.com/go-gitea/gitea/assets/2114189/4c11dd67-ac03-4568-8541-91204d27a4e3) ![image](https://github.com/go-gitea/gitea/assets/2114189/38a22cec-41be-41e6-a209-f347b7a4c1de) </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