Skip to content

Commit 709e403

Browse files
authored
Merge pull request readthedocs#54 from readthedocs/humitos/rename-config
Rename hoverxref_default_types to hoverxref_role_types
2 parents c7cbe9b + 94f8a73 commit 709e403

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
'confval',
6767
]
6868

69-
hoverxref_default_types = {
69+
hoverxref_role_types = {
7070
'hoverxref': 'tooltip',
7171
'ref': 'modal',
7272
'confval': 'tooltip',

docs/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ General settings
1414

1515
These settings are global and have effect on both, tooltips and modal dialogues.
1616

17-
.. confval:: hoverxref_default_types
17+
.. confval:: hoverxref_role_types
1818

1919
Description: Style to use by default when hover each type of reference (role).
2020

@@ -36,7 +36,7 @@ These settings are global and have effect on both, tooltips and modal dialogues.
3636

3737
.. confval:: hoverxref_default_type
3838

39-
Description: Default style when the specific one was not found in :confval:`hoverxref_default_types`.
39+
Description: Default style when the specific one was not found in :confval:`hoverxref_role_types`.
4040

4141
Default: ``tooltip``
4242

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ We currently support two different types of floating windows: Tooltip and Modal.
2727

2828
.. note::
2929

30-
The default style (tooltip or modal) is defined by the config :confval:`hoverxref_default_types <hoverxref_default_types>`.
30+
The default style (tooltip or modal) is defined by the config :confval:`hoverxref_role_types <hoverxref_role_types>`.
3131

3232

3333
.. tab:: Tooltip style

hoverxref/domains.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ def _inject_hoverxref_data(self, env, refnode, typ, docname, docpath, labelid):
2222
type_class = 'modal'
2323
classes.append(type_class)
2424
if not type_class:
25-
type_class = env.config.hoverxref_default_types.get(typ)
25+
type_class = env.config.hoverxref_role_types.get(typ)
2626
if not type_class:
2727
default = env.config.hoverxref_default_type
2828
type_class = default
2929
logger.warning(
3030
'Using default style for unknown typ. '
31-
'Define it in hoverxref_default_types. typ=%s style=%s',
31+
'Define it in hoverxref_role_types. typ=%s style=%s',
3232
typ,
3333
default,
3434
)

hoverxref/extension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def setup(app):
251251
app.add_config_value('hoverxref_roles', [], 'env')
252252
app.add_config_value('hoverxref_domains', [], 'env')
253253
app.add_config_value('hoverxref_ignore_refs', ['genindex', 'modindex', 'search'], 'env')
254-
app.add_config_value('hoverxref_default_types', {}, 'env')
254+
app.add_config_value('hoverxref_role_types', {}, 'env')
255255
app.add_config_value('hoverxref_default_type', 'tooltip', 'env')
256256
app.add_config_value('hoverxref_api_host', 'https://readthedocs.org', 'env')
257257

tests/test_htmltag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def test_python_domain(app, status, warning):
179179
'hoverxref_default_type': 'modal',
180180
},
181181
)
182-
def test_default_types(app, status, warning):
182+
def test_default_type(app, status, warning):
183183
app.build()
184184
path = app.outdir / 'index.html'
185185
assert path.exists() is True

0 commit comments

Comments
 (0)