Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Separate UI logic from Traits #148

Open
rvodden opened this issue Oct 22, 2017 · 1 comment
Open

Separate UI logic from Traits #148

rvodden opened this issue Oct 22, 2017 · 1 comment

Comments

@rvodden
Copy link
Collaborator

rvodden commented Oct 22, 2017

When I implemented #144 I put in a comment that edit_post_page should not be public. This is because I didn't like idea of the traits being coupled to the pages. The way I see it:

  1. Contexts should link the steps or tags to the appropriate calls.
  2. Those calls will either be:
    • using the backend and therefore using the driver API via the traits or,
    • exercising the UI and therefore using the Pages API.

There should, therefore, be no need for the traits to be aware of the pages. The contexts will be aware of both the traits and the pages. I'm only aware of two places the traits have page code:

  1. edit_post_page as mentioned above.
  2. UserAwareContextTrait currently has the login and logout code in it. That can very easily be moved to a page - just not sure which one right now.
@paulgibbs
Copy link
Owner

Would be keen to have @stephenharris ' views on this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants