-
-
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
Fix #21406: Hide repo information from file view/blame mode #21420
Conversation
- Hide repository's description, website link, topics list, and statistics bar while viewing or blaming a file from the repo - Resolves go-gitea#21406
- Asserts that repo description, topics and summary are not displayed in file view / blame mode - Resolves go-gitea#21406
I think it would make more sense to hide it from the directory view as well, at the very least if it's not the repository root. If someone follows a directory link they probably want to primarily see the directory contents and not all the cluttery top info, right? I'd at least guess that's the case. Edit: other than that it looks great tho!! I'm excited, would be nice to be able to link stuff like the license files without people getting lost trying to actually read it 😊 this is good |
would be nice to add unit test that repository home page displays description and topics |
|
For what it's worth, they're not hard to find, repo main link to get to main page again and all the more project-wide stuff is back. While that does require more clicks, that's true, having too many things that aren't really about the scope of the file (and that menu isn't, it's about general project info and not e.g. commits or lang stats related to the file) risk confusing the user in that context. So IMHO I think it's better left away. For what it's worth, GitHub also leaves it away. Edit: I'm just a random user though, so ignore me if in doubt |
Hi @lafriks,
There is an existing integration test covering the home page view. Will it be fine if I add the required assertions to this existing test? (
Will check this part. Is it fine to address this in the same PR ? |
yes feel free to add assertions to existing test Also yes it's ok to address that in this PR |
- Asserts if repo description, topics and summary are displayed in the repo home page - Test enhancement for go-gitea#21406
- The repo description, topics and summary will not be displayed within a directory - The repo home page will still display the repo info - Resolves go-gitea#21406
The change which hides the repo info from the directory view has also been incorporated Before the fix
After the fix
The repo description, topics and summary will not be displayed
The repo description, topics and summary will be displayed |
- Asserts the presence of repo-files-table in directory view - Revised zero check assertions
* upstream/main: Add cynkra bronze sponsor (go-gitea#21325) Run `make fmt` (go-gitea#21437) Remove useless `appVer` from JS `window.config` (go-gitea#21445) Add support for Chocolatey/NuGet v2 API (go-gitea#21393) Fix go-gitea#21406: Hide repo information from file view/blame mode (go-gitea#21420)
Summary
The repo information such as description, stats and topics are getting displayed in the top-bar when viewing a file. This has been fixed to display the repo information only while navigating the repo and not while viewing or blaming a file from the repo
Before fix
Screenshot from the issue
After the fix
The repo description, topics and summary will be displayed
The repo description, topic and summary has been conditionally hidden from the view
The repo description, topics and summary will not be displayed
Supporting integration tests have also been added.