Skip to content

Conversation

@mpabarca
Copy link
Contributor

@mpabarca mpabarca commented Aug 1, 2024

Description

Create project button on sidebar header that link to page on shape-docs that helps on the creation of a new openapi repository on github following this guidance and this base url:

https://github.com/new?name={...}&description={...}&template_owner={...}&template_name={...}

Motivation and Context

Screenshots:

V3
Screenshot 2024-08-05 at 16 28 51
Screenshot 2024-08-05 at 16 29 00
Screenshot 2024-08-05 at 16 29 09

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@mpabarca mpabarca self-assigned this Aug 1, 2024
@mpabarca mpabarca marked this pull request as ready for review August 5, 2024 14:30
@simonbs
Copy link
Contributor

simonbs commented Aug 6, 2024

AWESOME!! 🚀 I'm on vacation now but will make sure to go through the changes once I'm back on Monday.

Copy link
Contributor

@simonbs simonbs left a comment

Choose a reason for hiding this comment

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

I added a couple of comments to the files. Below are a few more general questions 😊

Is the highlighted text off by one character?

I love the highlighted text feature—such a fun touch! It seems like the highlight is consistently one character too long, though. I’ve pointed this out in the screenshot below. Is there an easy way to adjust that?

Screenshot 2024-08-12 at 08 56 17

Should we reduce the number of documentation links?

Linking to the documentation is a great idea. However, the multiple "(?)" links might add a bit of clutter and make it seem like there’s a lot more to read than necessary. Would it be enough to just have the "Read more about Adding Documentation to Shape Docs" link at the bottom?

Can we link the user to the project?

Wouldn’t it be cool if step four linked directly to the documentation on Shape Docs? Since the user enters the project name, we could use that to generate the URL. Maybe we show the link after the "Create Repository" button is clicked? We could eventually have it poll the project list to confirm creation, but I don’t think that’s needed right away.

@simonbs
Copy link
Contributor

simonbs commented Aug 13, 2024

Should we reduce the number of documentation links?

Linking to the documentation is a great idea. However, the multiple "(?)" links might add a bit of clutter and make it seem like there’s a lot more to read than necessary. Would it be enough to just have the "Read more about Adding Documentation to Shape Docs" link at the bottom?

Looking at it again, removing these links would also eliminate another challenge, albeit a small one. The links behind the "(?)" buttons currently assume that the HELP_URL environment variable points to our wiki, or at least to a website with the exact same subpages. However, that's not the case. Anyone deploying Shape Docs is free to provide a HELP_URL that points to any internal documentation.

@mpabarca
Copy link
Contributor Author

Should we reduce the number of documentation links?
Linking to the documentation is a great idea. However, the multiple "(?)" links might add a bit of clutter and make it seem like there’s a lot more to read than necessary. Would it be enough to just have the "Read more about Adding Documentation to Shape Docs" link at the bottom?

Looking at it again, removing these links would also eliminate another challenge, albeit a small one. The links behind the "(?)" buttons currently assume that the HELP_URL environment variable points to our wiki, or at least to a website with the exact same subpages. However, that's not the case. Anyone deploying Shape Docs is free to provide a HELP_URL that points to any internal documentation.

@simonbs completely right. I had considered this issue before but thought the value provided was more important than future-proofing. However, after getting a second opinion, I agree—it didn’t add much value, so it’s better to remove them.

@mpabarca
Copy link
Contributor Author

Can we link the user to the project?

Wouldn’t it be cool if step four linked directly to the documentation on Shape Docs? Since the user enters the project name, we could use that to generate the URL. Maybe we show the link after the "Create Repository" button is clicked? We could eventually have it poll the project list to confirm creation, but I don’t think that’s needed right away.

@simonbs This would be awesome! However, we might encounter an issue when adding this feature: determining the repository owner.

To redirect, we would use this format: https://github.com/{owner}/{project-name}

Initially, we could assume that the owner could be inferred from the template key, e.g., NEW_PROJECT_TEMPLATE_REPOSITORY=shapehq/starter-openapi, but I’m not sure this would work for all future scenarios. If I’m wrong, please let me know—or if you see another way to reliably get the owner.

Another scenario to consider is that the user might change the project name on GitHub without us knowing. This could result in redirecting to the wrong or a non-existent repository.

@simonbs
Copy link
Contributor

simonbs commented Aug 13, 2024

@simonbs This would be awesome! However, we might encounter an issue when adding this feature: determining the repository owner.

Right, that's a good point. I did not think of that. Let's abandon this idea for now.

@mpabarca mpabarca requested a review from simonbs August 13, 2024 14:08
simonbs
simonbs previously approved these changes Aug 14, 2024
Copy link
Contributor

@simonbs simonbs left a comment

Choose a reason for hiding this comment

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

Yay! Let's get this merged in 🚀🙌

@simonbs simonbs enabled auto-merge (rebase) August 14, 2024 06:49
@simonbs simonbs merged commit eebbfc3 into develop Aug 14, 2024
@simonbs simonbs deleted the feature/new-project-page branch August 14, 2024 06:52
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.

2 participants