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

Add page to view all projects of a user / group #741

Merged
merged 7 commits into from
Feb 6, 2022

Conversation

nitn3lav
Copy link
Contributor

@nitn3lav nitn3lav commented Feb 2, 2022

  • adds a page /<user-or-group-name> to view all enabled woodpecker repos of a user / group
  • also includes a link from the repo page to the owner page
  • related to Feedback: UI 💬 #468
Bildschirmaufnahme.2022-02-02.um.23.20.36.mov

shows all repos owned by a person or organization
uses /:repoOwner urls (e. g. ci.example.org/example-org)
also includes a link from the repo page to the owner page
related to woodpecker-ci#468
@6543 6543 added enhancement improve existing features ui frontend related labels Feb 3, 2022
@6543

This comment was marked as resolved.

@anbraten anbraten changed the title page /<user-or-group-name> to view all woodpecker repos of a user / group Add page to view all projects of a user / group Feb 3, 2022
Copy link
Member

@anbraten anbraten left a comment

Choose a reason for hiding this comment

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

Nice PR and great work. Just for interest: Do you used our UI development docs or did you managed to setup the woodpecker UI development on your own? Seems like you did some frontend dev before 😉

We (I) need to test if / how this currently works for other users. Will a user easily see all public repos of a different owner?

web/src/views/ReposOwner.vue Outdated Show resolved Hide resolved
web/src/views/ReposOwner.vue Show resolved Hide resolved
implements the changes suggested by @anbraten:
- removed the `add repository` button
- now shows a message `This organization / user does not have any projects yet.`
  when appropriate

now uses `grid` instead of `flex` on desktop to keep the search bar
centered and always in the same place
@nitn3lav
Copy link
Contributor Author

nitn3lav commented Feb 3, 2022

Just for interest: Do you used our UI development docs or did you managed to setup the woodpecker UI development on your own?

I first cloned the repo and tried to run the UI from VS Code which worked after I had found out that I needend to install yarn by taking a look at launch.json. To connect the UI with a server I used the documentation. Since I was already running Woodpecker in Docker on my server I mostly copied the config to my local machine and added WOODPECKER_DEV_WWW_PROXY=http://host.docker.internal:8010 (localhost doesn't work because the container has its own IP address) as an environment variable.

Seems like you did some frontend dev before 😉

I have done some plain HTML, CSS and PHP (using no frameworks and almost no JS (even for things like tabs)), a bit UIKit, a half finished iOS (& macOS) app using SwiftUI and an almost finished Flutter app. I also have a project which I stared using plain HTML, PHP and JS, added Vue.js, then switched to Flutter because at the time I was also working on the other Flutter app and I was planning to eventually build a mobile app anyways. When the Fluter app was almost in a usable state I found that the glitches and huge bundle size were not ideal for a browser first app which recently caused me to completely rewrite the frontend using React Native (using Expo for crossplatform on web, iOS and Android).

Will a user easily see all public repos of a different owner?

I am currently using the same RepoStore and useRepoSearch(repos, search) as for the existing repos page, where repos is filtered by the owner. It might be possible to optimize this by only fetching the owner's repos (and not all other repos, too) from the server.

@6543 6543 added this to the 0.15.0 milestone Feb 4, 2022
@6543
Copy link
Member

6543 commented Feb 4, 2022

I'm okay on how it works, but like to refactor the getRepos api ... to have optional filters based on name ... owner ... usw

but that's for another pull :)

@6543
Copy link
Member

6543 commented Feb 4, 2022

@valentinleistner I only found one nit, before its good to go :)

the space for a user/org repo list between items do not exist:
Bildschirmfoto zu 2022-02-04 13-49-51

should look like:
Bildschirmfoto zu 2022-02-04 13-49-39

@anbraten
Copy link
Member

anbraten commented Feb 4, 2022

The problem is a different one here tough. The current implementation of the getRepos endpoint only returns repos / projects you own somehow, but in this case we need to get all public projects someone else owns. We may need to think about adding a new property owned: true or similar to the project. This would also help with pipeline runs of public repos appearing in your sidebar as there is a difference in I own the project and I can access the project as it is public or internal.

@6543
Copy link
Member

6543 commented Feb 4, 2022

well if that's already n issue, we can fix it within this pull ...

@6543 6543 enabled auto-merge (squash) February 6, 2022 19:52
@6543
Copy link
Member

6543 commented Feb 6, 2022

I did add a todo ... as this refactor wont make it into v0.15.0 ... :)

@6543 6543 merged commit 6bb9649 into woodpecker-ci:master Feb 6, 2022
@nitn3lav nitn3lav deleted the repos-owner-view branch February 8, 2022 20:14
@qwerty287 qwerty287 mentioned this pull request Feb 20, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing features ui frontend related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants