-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
WIP: Support new file/upload file buttons on empty repo home page #6918
Conversation
lunny
commented
May 12, 2019
@xf- I don't think that's better than current design. |
Codecov Report
@@ Coverage Diff @@
## master #6918 +/- ##
==========================================
+ Coverage 42.09% 42.10% +0.01%
==========================================
Files 758 758
Lines 81106 81121 +15
==========================================
+ Hits 34139 34157 +18
+ Misses 41386 41385 -1
+ Partials 5581 5579 -2
Continue to review full report at Codecov.
|
modules/repofiles/temp_repo.go
Outdated
Name: branch, | ||
if t.repo.IsEmpty { | ||
if _, stderr, err := process.GetManager().ExecTimeout(5*time.Minute, | ||
fmt.Sprintf("Clone (git clone -s --bare): %s", t.basePath), |
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 you move this command exec to git package?
modules/repofiles/temp_repo.go
Outdated
} else { | ||
if _, stderr, err := process.GetManager().ExecTimeout(5*time.Minute, | ||
fmt.Sprintf("Clone (git clone -s --bare): %s", t.basePath), | ||
"git", "clone", "-s", "--bare", "-b", branch, t.repo.RepoPath(), t.basePath); err != nil { |
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.
Same
modules/repofiles/temp_repo.go
Outdated
t.basePath, | ||
fmt.Sprintf("commitTree (git commit-tree): %s", t.basePath), | ||
env, | ||
"git", "commit-tree", treeHash, "-m", message) |
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.
Same
Think I'd also prefer having those button beside the clone URL. As an alternative, a bit less padding could also work. Or maybe even move the buttons into the header on the top-right. |
I like the idea of having the buttons next to clone, because that is what it is like when files are in the repo. So it would keep things the same for users. If we don't have it next to clone, I like @silverwind's alternative of having less padding. A third alternative is to make the buttons Giant, so they fill up the empty whitespace. Here is a screenshot of what GitHub does, but I don't like how they made the create/upload actions text: (sidenote: thanks @silverwind for GitHub dark theme) |
I like the idea of subtle text links. No need for big distracting buttons when most people will probably want to initizalize a repo through other means. |
Agree it seems odd not to just have it in the same spot as every other page. Consistency across pages seems more important than anything else for this case |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
Should fix #4308 |
f784d08
to
348d94d
Compare
As of #14633, there is the request to include this ability also for the API. |
It will not be very difficult once this PR merged. |
@lunny, any news on this PR? It would be a great feature to have. |
Will continue this PR after some PRs merged. |
3306e2d
to
32ed105
Compare
Any update on this? |
The code base has been changed a lot since this PR opened, just close it. |
So, no way to add /create new file/s from the web ui? Honest question, I just installed it (rootless docker) and I'm stumped... |
No, you could add /create new file/s from the web ui on a non-empty repository. |
Allow adding new files to an empty repo #24164 All related issues could be re-reviewed and closed. |