Skip to content
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

[Feature] Private README.md for organization #32872

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

changchaishi
Copy link
Contributor

@changchaishi changchaishi commented Dec 17, 2024

Implemented #29503

Changes:

  1. Since individual users and organizations use the same .profile repository name for README.md, adding the private one, I rename the contexts with Public and Private inside them.
  2. I wanted to load the private profile the same as GitHub, which uses the view_as query parameter. Still, the existing query scheme is quite limited due to the integration with the search form and the repository paginator, so my workaround is to forcefully bring augmented query strings of member/public to the tmpl file.
  3. The drop-down is adopted from the search box's sort by component, we need to discuss the stylings.

Things lack and need further guidance:

  1. At the create repository page, the ideal user experience is when the repo name is entered .profile the make repository private checkbox should be disabled and stay unchecked, whereas .profile-private, the checkbox should be disabled and force checked.
  2. Follow 1., Tool tips should be added.
  3. The translation and CSS for the current drop box and view as public/member feature.

Screenshots
Demo:
drop_down

Need help:
auto_check_and_disable

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 17, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 17, 2024
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Dec 17, 2024
Comment on lines +18 to +25
{{if .IsViewerMember}}
{{if and .ShowMemberAndTeamTab .PrivateProfileReadme}}
<div id="readme_profile" class="markup">{{.PrivateProfileReadme}}</div>
{{end}}
{{else}}
{{if .PublicProfileReadme}}
<div id="readme_profile" class="markup">{{.PublicProfileReadme}}</div>
{{end}}
Copy link
Contributor

@wxiaoguang wxiaoguang Dec 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems not easy as it looks.

The "view as" not only affects the "profile REAMDE", but also affects the repositories listed and other permission-related contents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants