-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Promote the YAML config on project import #5444
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
Conversation
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.
Looks good to me.
I think it's important to check corporate before merge it and probably adapt the code there as well.
This PR modifies the manual import screen to streamline things and promote the YAML config file for importing new repositories.
It seems that it does also affect the "automatic" import from VCS services, not only "Manual import".
@@ -255,16 +254,11 @@ class ImportWizardView(ProjectSpamMixin, PrivateViewMixin, SessionWizardView): | |||
|
|||
form_list = [ | |||
('basics', ProjectBasicsForm), | |||
('extra', ProjectExtraForm), |
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.
If we ending up with only one form in this list, we may remove the SessionWizardView
and handle this as a normal view.
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.
The corporate code actually relies on self.form_list
. That's why I didn't completely refactor this view.
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.
Why not refactor the corporate code for this as well?
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.
I'm trying to make the scope of the change smaller rather than larger.
kwargs['user'] = self.request.user | ||
if step == 'basics': | ||
kwargs['show_advanced'] = True | ||
kwargs = {'user': self.request.user} |
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.
This ImportWizardView
view is overridden in the corporate site, we probably need to make some changes there together with this PR and double check that this process still works there. Can you test it and apply the same changes there?
@@ -8,15 +8,26 @@ Here is an example of how this file looks like: | |||
|
|||
.. code:: yaml |
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.
Instead of the above line saying,
Here is an example of how this file looks like:
what about saying something like "Here is a minimum example configuration file:" or some better phrase than that one but making it clear that it's the minimum inviting the user to copy and paste as is other than keep reading the whole page.
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.
I think there's a few changes so that the YAML docs are better "at a glance". I think that should be a separate PR but I can take care of this small change here.
I'll take a look at that. I thought they were totally separate. |
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.
I also think we should check the corporate site and that import from remote repos still works, but looks good to me :)
As-is, this change works fine with the corporate side and with the automatic import via VCS integrations. Interestingly, the automatic import with integrations sends the project description but that was never used with the advanced form. This change does impact the corporate side in that there will be no way to specify before importing to use a different documentation type (eg. mkdocs, sphinx dirhtml) other than with the YAML file. Are we ok with that? I do think that it could simplify things to refactor the ImportWizardView to not be a wizard but just be a regular view. That is a bigger change however as it involves completely refactoring the view on .org and where it is overridden in .com. I am not opposed to it but it will take a bit more time and coordination. Thoughts? |
I'm not sure, I mean people using a different location from sphinx will face an error too or people that need a requirements file, and they need to go the admin page anyway. So, I'm ok with removing the advanced options from the import menu, something we can't do is remove the advanced option from the admin page, not till we have a solution for changing settings to build old versions of docs |
Agreed. |
I'm not 100% convinced yet. On one side, if we want to promote the YAML file and make the user to use it, giving the "Advanced" options at import time is not a good idea. On the other side, the on-boarding experience for all the MkDocs projects won't be amazing (the first build will always fail --unless a YAML file propoerly configured already exists in the repo)
I'm 👍 on this. Although, if this PR is ready to be merged, we can merge it and make the refactor as a second step. |
Actually, there a lot of projects that will fail if they are not correctly setup, like having the correct requirements file, having the conf.py file in another directory than |
I wonder if it's worth just adding the callout to the YAML file for now, but allowing users to edit advanced options still? That way we get both benefits, but don't make a worse experience for users who are not on YAML yet. |
I just wanted to comment here in case we come back to this. We decided to go with #5485 which does the promotion without removing the advanced project settings for now. The advanced project settings can probably go away but it looks like it is a bigger change. |
This PR modifies the manual import screen to streamline things and promote the YAML config file for importing new repositories.
Fixes #5414
Screenshots
Before
After