-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Docs for feature flag #5043
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
Merged
ericholscher
merged 10 commits into
readthedocs:master
from
dojutsu-user:docs-for-feature-flags
Jan 29, 2019
Merged
Docs for feature flag #5043
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3fbe47d
Add feature-flags page
dojutsu-user 4adef9e
add ques on faq
dojutsu-user 78389bb
Add the forgotten >
dojutsu-user c7c7370
fix relative link
dojutsu-user 534026d
add improvements
dojutsu-user 9bbd946
implement rst role
dojutsu-user 2f8cedb
automatic updation of docsfor feature flags
dojutsu-user 3e83667
Merge branch 'master' into docs-for-feature-flags
dojutsu-user 819e5c8
change working of role
dojutsu-user 5d5c2ff
update if condition
dojutsu-user File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[rstcheck] | ||
ignore_directives=automodule,http:get,tabs,tab,prompt | ||
ignore_roles=djangosetting,setting | ||
ignore_roles=djangosetting,setting,featureflags | ||
ignore_messages=(Duplicate implicit target name: ".*")|(Hyperlink target ".*" is not referenced) |
This file contains hidden or 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 hidden or 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 hidden or 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,31 @@ | ||
Feature Flags | ||
============= | ||
|
||
Read the Docs offers some additional flag settings which can be only be configured by the site admin. | ||
These are optional settings and you might not need it for every project. | ||
By default, these flags are disabled for every project. | ||
A seperate request can be made by opening an issue on our `github`_ to enable | ||
or disable one or more of these featured flags for a particular project. | ||
|
||
.. _github: https://github.com/rtfd/readthedocs.org | ||
|
||
Available Flags | ||
--------------- | ||
|
||
``USE_SPHINX_LATEST``: :featureflags:`USE_SPHINX_LATEST` | ||
|
||
``USE_SETUPTOOLS_LATEST``: :featureflags:`USE_SETUPTOOLS_LATEST` | ||
|
||
``ALLOW_DEPRECATED_WEBHOOKS``: :featureflags:`ALLOW_DEPRECATED_WEBHOOKS` | ||
|
||
``PIP_ALWAYS_UPGRADE``: :featureflags:`PIP_ALWAYS_UPGRADE` | ||
|
||
``SKIP_SUBMODULES``: :featureflags:`SKIP_SUBMODULES` | ||
|
||
``DONT_OVERWRITE_SPHINX_CONTEXT``: :featureflags:`DONT_OVERWRITE_SPHINX_CONTEXT` | ||
|
||
``ALLOW_V2_CONFIG_FILE``: :featureflags:`ALLOW_V2_CONFIG_FILE` | ||
|
||
``MKDOCS_THEME_RTD``: :featureflags:`MKDOCS_THEME_RTD` | ||
|
||
``DONT_SHALLOW_CLONE``: :featureflags:`DONT_SHALLOW_CLONE` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 we could use a rst role to keep the list updated, something like #4451 (comment) https://github.com/rtfd/readthedocs.org/pull/4451/files#diff-d4de2c39f7f56cdad5a95921ae1398ec
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
I didn't get it.
Do you want to render the whole list (with description) with rst role? or just the description? or any other thing?
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.
List and description
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
I have tried it and i suppose that the function for "role" is working fine. However I am not able to get the output at the docs.
Can you please help me in this. I am unable to find the mistakes.
The output I'm getting is
featureflags:
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
It was a wonderful idea. I managed to implement it successfully and now the flags with their description are rendering as desired automatically.
Here is the image of the feature flags docs page - image
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 love adding features like this to our docs! 💯
I would suggest a change here: instead of using a role to put all of the different feature flags in a single block, this should mimic what the django setting role does.
Also, if you were to implement a feature like this normally, you'd use a
directive
, not arole
. I do thinkrole
would be preferred here if you were to match how we are using the django settingrole
. It allows us to put more commentary around the output.Uh oh!
There was an error while loading. Please reload this 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.
@agjohnson
I am a little confused.
This is what I'm getting now.
nodes.Text
.But doing this, we will lost the automatic rendering of the docs.
Also, the docs will look like this - image
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 don't think we want to fully automate things, there might be some feature flags we don't want documented or don't need documented.
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.
Thank you for the explanation.
I have followed your advice and changed the pattern of the role similar to
djangosettings role
.