Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

New component structure #49

Merged
merged 5 commits into from
Feb 21, 2017
Merged

New component structure #49

merged 5 commits into from
Feb 21, 2017

Conversation

marcofucci
Copy link
Contributor

@marcofucci marcofucci commented Feb 17, 2017

This:

  • restructures the components to make them more flexible
  • tries to improved the wagtail edit form page with some custom style
  • adds an import form which gets the content from the betahealth app and imports it into the db

Things still to address but probably in separate PRs:

  • the rashes-in-babies-and-children page contains components to redesign (section_list and section_nav)
  • the hernia/surgery-guide page contains components to redesign (article_list and article_nav)
  • the hernia/operation page contains a reveal with a callout which causes circle dependency errors
  • the API should add a description field and the import script should import the related values from the content folder

Before:
wagtail - old interface

After:
wagtail - new interface

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.2%) to 95.203% when pulling 8b251a6e50c27fa2951f1310f8776e2495276d41 on components-v2 into 8688d87 on master.

class Meta:
model = Page
#
# @classmethod
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete?

value = RichTextBlock()

def __init__(self, **kwargs):
super(TextBlock, self).__init__(**kwargs)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not super().__init__(**kwargs)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 no reason, still getting used to it.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.2%) to 95.2% when pulling 27f02dd0b837d4727ff5c2c7d0e9a3dc8eef5c60 on components-v2 into 8688d87 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.2%) to 95.2% when pulling 4e8f669525561f857eaae51d97e30623861e6f99 on components-v2 into 8688d87 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.2%) to 95.2% when pulling 5e782d126fa558932c602e6e81d83d015295ec05 on components-v2 into 8688d87 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.2%) to 95.2% when pulling e2f1ee1c0d28bcb51a609c8eacc1d4e8b17c3800 on components-v2 into 8688d87 on master.

marcofucci and others added 3 commits February 20, 2017 17:22
This redesigns the components making them more flexible
from a technical point of view.
This does not translate custom markdown (callouts, reveal etc.)
into proper components as it would be too fragile.
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.2%) to 95.2% when pulling 3894f3dd2cfcd599e39af3fcb9a01fd1ed17aa60 on components-v2 into 8688d87 on master.

@r4vi r4vi self-requested a review February 21, 2017 10:20
@r4vi
Copy link

r4vi commented Feb 21, 2017

Python is fine, no idea about the other stuff!

{% block content %}
{% include "wagtailadmin/shared/header.html" with title="Import content" %}

<div class="nice-padding">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it four or two spaces?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tyom changed to 4 spaces as it seems to be the convention at Torchbox

@teneightfive
Copy link

I think this is fine for this major change of restructuring the components and some of the UI but I imagine we'll have to do some more to the UI to reduce the complexity. We're still requiring content designers to think of components as we do whereas they will be thinking in the context of the page and what content appears in a component.

We may want to investigate the idea of presets which are related to a certain content structure like "Do/don't" component which gets rendered as two areas of content and the content store handles sending that out via the API as something like a split_content with two split_areas and possibly a modifier to let the frontend know it needs to render it with the tick and cross lists.

Food for thought...

So that it's easy to move content to our Publishing Tool
from our current filesystem strategy.

This app is meant to be removed after switching to REST Api
rendering only.
This adds a migration to automatically create symptoms and
conditions pages if they don't exist in the db already.
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.2%) to 95.2% when pulling cc06ebe on components-v2 into 8688d87 on master.

@marcofucci marcofucci merged commit 282febe into master Feb 21, 2017
@marcofucci marcofucci deleted the components-v2 branch February 21, 2017 13:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants