Skip to content

Commit 8130fd1

Browse files
committed
Change the way we render the react components
These are now rendered regularly, instead of within a shadow dom. This was necessary before due to some style clashes, but it seems this is not needed anymore (which makes our lives that much more easy)
1 parent cfb61e4 commit 8130fd1

File tree

4 files changed

+8
-101
lines changed

4 files changed

+8
-101
lines changed

wger/core/static/css/react-simple-wysiwyg.css

Lines changed: 0 additions & 89 deletions
This file was deleted.

wger/core/templates/template.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@
5353
<link rel="stylesheet" type="text/css" href="{% static 'node/@wger-project/react-components/build/assets/index.css' %}" id="react-css">
5454
{% endcompress %}
5555

56-
{# this needs to be outside of the compress block! #}
57-
<link
58-
rel="stylesheet"
59-
type="text/css"
60-
href="{% static 'css/react-simple-wysiwyg.css' %}"
61-
id="react-css"
62-
>
63-
6456
<link rel="stylesheet" href="{% static 'css/language-menu.css' %}">
6557

6658
<link rel="icon" href="{% static 'images/favicon.png' %}" type="image/png">

wger/core/views/react.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ class ReactView(TemplateView):
2525
"""
2626

2727
template_name = 'react/react-page.html'
28-
div_id = 'react-page'
28+
div_id = 'react-page-no-shadow-dom'
29+
"""
30+
Default div ID where the React app is mounted
31+
32+
If you want to render the component in a shadow dom, use 'react-page' instead.
33+
"""
34+
2935
login_required = False
3036

3137
def get_context_data(self, **kwargs):

wger/manager/urls.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@
6868
ReactView.as_view(login_required=True),
6969
name='add',
7070
),
71-
# Note that this needs to be the no-shadow-dom variant till this issue is fixed:
72-
# https://github.com/hello-pangea/dnd/issues/425
7371
path(
7472
'<int:pk>/edit',
75-
ReactView.as_view(login_required=True, div_id='react-page-no-shadow-dom'),
73+
ReactView.as_view(login_required=True),
7674
name='edit',
7775
),
7876
path(

0 commit comments

Comments
 (0)