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

WIP: Support new file/upload file buttons on empty repo home page #6918

Closed
wants to merge 5 commits into from

Conversation

lunny
Copy link
Member

@lunny lunny commented May 12, 2019

image

@lunny lunny added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label May 12, 2019
@xf-
Copy link
Contributor

xf- commented May 12, 2019

Maybe add the right portion of the normal bar on the top left side and set Download on disabled:
image

This would be a much more constant UI and user expierence

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 12, 2019
@lunny
Copy link
Member Author

lunny commented May 12, 2019

@xf- I don't think that's better than current design.

@codecov-io
Copy link

codecov-io commented May 12, 2019

Codecov Report

Merging #6918 (3306e2d) into master (41c0776) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
modules/context/repo.go 55.51% <100.00%> (+0.57%) ⬆️
modules/repofiles/update.go 37.60% <100.00%> (+0.51%) ⬆️
routers/repo/view.go 41.94% <100.00%> (+0.36%) ⬆️
routers/routes/web.go 91.58% <100.00%> (+0.03%) ⬆️
modules/log/event.go 59.90% <0.00%> (-1.89%) ⬇️
modules/git/repo_commit_nogogit.go 63.33% <0.00%> (-1.67%) ⬇️
modules/indexer/stats/db.go 68.00% <0.00%> (ø)
services/pull/pull.go 42.64% <0.00%> (+0.49%) ⬆️
models/unit.go 49.31% <0.00%> (+2.73%) ⬆️
modules/git/repo_language_stats_nogogit.go 61.70% <0.00%> (+4.25%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41c0776...3306e2d. Read the comment docs.

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),
Copy link
Member

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?

} 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 {
Copy link
Member

Choose a reason for hiding this comment

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

Same

t.basePath,
fmt.Sprintf("commitTree (git commit-tree): %s", t.basePath),
env,
"git", "commit-tree", treeHash, "-m", message)
Copy link
Member

Choose a reason for hiding this comment

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

Same

@silverwind
Copy link
Member

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.

@techknowlogick
Copy link
Member

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:
Screen Shot 2019-05-16 at 3 27 52 PM

(sidenote: thanks @silverwind for GitHub dark theme)

@silverwind
Copy link
Member

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.

@mrsdizzie
Copy link
Member

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

@lunny lunny added this to the 1.10.0 milestone Jul 7, 2019
@stale
Copy link

stale bot commented Sep 5, 2019

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.

@stale stale bot added the issue/stale label Sep 5, 2019
@lunny lunny modified the milestones: 1.10.0, 1.11.0 Sep 5, 2019
@stale stale bot removed the issue/stale label Sep 5, 2019
@lunny lunny added issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented issue/stale labels Sep 5, 2019
@stale stale bot removed the issue/stale label Sep 5, 2019
@lunny lunny modified the milestones: 1.11.0, 1.12.0 Dec 13, 2019
@lunny
Copy link
Member Author

lunny commented Dec 20, 2019

Should fix #4308

@lunny lunny modified the milestones: 1.12.0, 1.13.0 May 2, 2020
@lunny lunny modified the milestones: 1.13.0, 1.14.0 Sep 1, 2020
@lunny lunny force-pushed the lunny/new_file_blank_repo branch 2 times, most recently from f784d08 to 348d94d Compare January 3, 2021 05:22
@delvh
Copy link
Member

delvh commented Feb 12, 2021

As of #14633, there is the request to include this ability also for the API.
Has that already been included in this branch?
Is that even the correct branch for that feature? I'd say so as it basically is concerned with the same topic, just from a slightly different perspective.
Or should a new branch be opened for that feature once this branch gets merged?

@lunny
Copy link
Member Author

lunny commented Feb 13, 2021

It will not be very difficult once this PR merged.

@jhult
Copy link
Contributor

jhult commented Jun 1, 2021

@lunny, any news on this PR? It would be a great feature to have.

@lunny
Copy link
Member Author

lunny commented Jun 2, 2021

@lunny, any news on this PR? It would be a great feature to have.

Will continue this PR after some PRs merged.

@zeripath zeripath modified the milestones: 1.15.0, 1.16.0 Jun 23, 2021
@lunny lunny mentioned this pull request Jul 14, 2021
@techknowlogick techknowlogick modified the milestones: 1.16.0, 1.17.0 Nov 23, 2021
@lunny lunny modified the milestones: 1.17.0, 1.x.x May 26, 2022
@mikeperalta1
Copy link

Any update on this?

@lunny lunny removed this from the 1.x.x milestone Dec 11, 2022
@lunny
Copy link
Member Author

lunny commented Dec 11, 2022

The code base has been changed a lot since this PR opened, just close it.

@lunny lunny closed this Dec 11, 2022
@lunny lunny deleted the lunny/new_file_blank_repo branch December 11, 2022 13:28
@ScarUY
Copy link

ScarUY commented Jan 18, 2023

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...

@lunny
Copy link
Member Author

lunny commented Jan 18, 2023

No, you could add /create new file/s from the web ui on a non-empty repository.
This PR is for empty repository.

@wxiaoguang
Copy link
Contributor

Allow adding new files to an empty repo #24164

All related issues could be re-reviewed and closed.

@go-gitea go-gitea locked and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.