-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Regroup advanced settings #5489
Regroup advanced settings #5489
Conversation
I haven't tested it with the corporate site, first I want to know if we are ok with this :) |
@@ -0,0 +1,9 @@ | |||
{% load i18n %} | |||
<p class="empty"> |
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.
Used the same patter that we have in settings https://readthedocs.org/dashboard/docs/edit/
I think we could adapt the note in the second group to say something like: "These settings can be defined in the YAML file. We strongly recommend that." or something like that inviting people to use the config file instead of the web. |
Agreed with @humitos -- the goal here is to push people to use YAML. We should also likely have logic here that shows if they already have a YAML config in their builds, and then puts a big warning that these settings won't do anything, if they do. |
But we'll be lying, these settings will still affect to the versions without a config file, we can't determinate exactly that sadly. |
But we can show that in the build page :), I'm creating another issue to track that |
Sure, but we can detect if any versions use a config, and make the warning more pronounced. We could even presumably query all active versions and say "these settings will apply to 2 out of 6 versions)" if it isn't too heavy on the DB. |
I think we should avoid making our UX for this view more complicated and instead frame these as "Default options" -- meaning, there is a path to overriding the options. Adding display to the view that adds information on which versions use which configuration option feels like we're putting emphasis on the wrong UI. The thing we can do here is completely hide the options for new projects, instead pointing them to the config file for all their versions. But i think we're addressing that separately. |
I put some thoughts about that in #5413
|
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 added a few minor bits of feedback but I'm pretty happy with this change overall. Great job!
The thing we can do here is completely hide the options for new projects, instead pointing them to the config file for all their versions. But i think we're addressing that separately.
I'm 👍 on doing this generally but I do agree that's a larger change involving a couple pieces and may not be best suited for here.
@@ -0,0 +1,10 @@ | |||
{% load i18n %} | |||
<p class="empty"> | |||
{% blocktrans with config_file_link="https://docs.readthedocs.io/page/config-file" %} |
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'd link directly to the v2 config file docs: https://docs.readthedocs.io/page/config-file/v2.html
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.
Also, you might consider adding trimmed
to the blocktrans
tag.
readthedocs/templates/projects/project_advanced_settings_helptext.html
Outdated
Show resolved
Hide resolved
Co-Authored-By: stsewd <[email protected]>
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 looks good. Let's ship it 👍
Co-Authored-By: stsewd <[email protected]>
@@ -13,7 +14,7 @@ | |||
|
|||
{% block project_edit_content %} | |||
<form method="post" action=".">{% csrf_token %} | |||
{{ form.as_p }} | |||
{% crispy form %} | |||
<p> | |||
<input style="display: inline;" type="submit" value="{% trans "Save" %}"> |
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.
@stsewd
{% crispy form %}
renders
<form>
<!-- csrf token -->
<!-- content -->
</form>
And we have wrapped this in outer <form>
tag and it is finally rendering something like this.
and so the Save
button, which is rendered outside <form>
tag, is not working anymore. We need to fix this before merging this in rel
branch
docs: https://django-crispy-forms.readthedocs.io/en/latest/crispy_tag_forms.html#fundamentals
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 is a continuation of #5459
Closes #5413
It looks like this
I'm not sure about the texts, so any help is welcome.