-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addons: allow users to define
root_selector
from the WebUI (#11181)
* Addons: allow users to define `root_selector` from the WebUI We are using `[role=main]` as the default root selector. However, there are documentation tools that don't define it. This PR exposes the `doc_diff_root_selector` to users to they can define a custom selector that work for their documentation tool. Reference readthedocs/addons#263 * Minor fix to tests * Add a placeholder to show the default value * Update migrations * Migrations fixed
- Loading branch information
Showing
6 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...ocs/projects/migrations/0119_alter_addonsconfig_flyout_sorting_custom_pattern_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Generated by Django 4.2.10 on 2024-03-12 09:34 | ||
|
||
from django.db import migrations, models | ||
from django_safemigrate import Safe | ||
|
||
|
||
class Migration(migrations.Migration): | ||
safe = Safe.before_deploy | ||
|
||
dependencies = [ | ||
("projects", "0118_addons_flyout_sorting"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="addonsconfig", | ||
name="flyout_sorting_custom_pattern", | ||
field=models.CharField( | ||
blank=True, | ||
default=None, | ||
help_text='Sorting pattern supported by BumpVer (<a href="https://github.com/mbarkhau/bumpver#pattern-examples">See examples</a>)', | ||
max_length=32, | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="historicaladdonsconfig", | ||
name="flyout_sorting_custom_pattern", | ||
field=models.CharField( | ||
blank=True, | ||
default=None, | ||
help_text='Sorting pattern supported by BumpVer (<a href="https://github.com/mbarkhau/bumpver#pattern-examples">See examples</a>)', | ||
max_length=32, | ||
null=True, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Generated by Django 4.2.10 on 2024-03-04 12:02 | ||
|
||
from django.db import migrations, models | ||
from django_safemigrate import Safe | ||
|
||
|
||
class Migration(migrations.Migration): | ||
safe = Safe.before_deploy | ||
dependencies = [ | ||
("projects", "0119_alter_addonsconfig_flyout_sorting_custom_pattern_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="addonsconfig", | ||
name="doc_diff_root_selector", | ||
field=models.CharField( | ||
blank=True, | ||
help_text="CSS selector for the main content of the page", | ||
max_length=128, | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="historicaladdonsconfig", | ||
name="doc_diff_root_selector", | ||
field=models.CharField( | ||
blank=True, | ||
help_text="CSS selector for the main content of the page", | ||
max_length=128, | ||
null=True, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters