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

List projects on homepage #16

Merged
merged 5 commits into from
Nov 5, 2023

Conversation

JohanWinther
Copy link
Contributor

Problem

When opening the homepage you are presented with an instruction to run the ui command in a project in UCM. This message can be confusing if you navigate to the homepage or if you have started a headless instance of UCM and connected to it with the development server.

Solution

This solution lists the projects and each branch on the homepage for easier navigation.

image

Caveats/Notes

It was decided together with @hojberg to not use the ProjectListing component since it takes a Unison Share project as a parameter, but local projects are of another (simpler) type. There might be a way to put together these two project concepts, but it is out of scope for this PR.

Copy link
Member

@hojberg hojberg left a comment

Choose a reason for hiding this comment

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

Sweet!! Thanks for adding this!

From the screenshot, I think this could benefit from some style tweaks. The margin is a bit disproportionate; probably should be larger between the projects and smaller between the project name and branch. This is fine in a secondary pass.

}
, projectNames
|> List.map
(fetchProjectBranches FetchProjectBranchesFinished
Copy link
Member

Choose a reason for hiding this comment

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

This seems fine right now (especially since its unlikely for there to be large number of projects and branches), but it'd be cool if the backend could support fetching both projects and branches in one go instead of an extra request for each branch, cc @ChrisPenner

Choose a reason for hiding this comment

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

Yeah that makes sense, this'll be fine for now (esp. since all of these requests are just to localhost)

src/UnisonLocal/Page/HomePage.elm Outdated Show resolved Hide resolved
src/UnisonLocal/Page/HomePage.elm Outdated Show resolved Hide resolved
src/UnisonLocal/Page/HomePage.elm Outdated Show resolved Hide resolved
Copy link
Member

@hojberg hojberg left a comment

Choose a reason for hiding this comment

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

🎉

@hojberg hojberg merged commit 732cfcf into unisonweb:main Nov 5, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants