Skip to content
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

feat(views): add attachments and responses to full object listing #10462

Merged
merged 1 commit into from
Jan 14, 2017
Merged

feat(views): add attachments and responses to full object listing #10462

merged 1 commit into from
Jan 14, 2017

Conversation

hypeJunction
Copy link
Contributor

BREAKING CHANGE
In core plugins, resource views now longer render comments and replies:
instead they pass a show_responses flag to the entity view, which
renders the responses and passes them to the listing view.
Full discussion view now uses full listing view
Full file view now passes file preview as an attachment to the listing view

echo elgg_view('object/elements/full', array(
'entity' => $blog,
'summary' => $summary,
'icon' => $owner_icon,
'body' => $body,
'responses' => $responses,
Copy link
Member

Choose a reason for hiding this comment

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

$responses may not be set here

@mrclay
Copy link
Member

mrclay commented Oct 21, 2016

What's the big motivation for this?

@hypeJunction
Copy link
Contributor Author

More extension points, consistency (plugins can't decide where to render responses - resource view or full view). Plugins can't effectively collaborate on views, it's a constant 'I got here first' battle. As a next step, I want to break out full item views into their own views.

@mrclay
Copy link
Member

mrclay commented Oct 22, 2016

Cool. Is this BC at all for existing plugins?

@hypeJunction
Copy link
Contributor Author

Should be. It defaults to false so if the replaced resource view renders the comments they won't appear twice.

);
$responses = elgg_view('discussion/replies', $params);
if ($topic->status == 'closed') {
$responses = elgg_view('discussion/closed');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needs to add string not replace

BREAKING CHANGE
In core plugins, resource views now longer render comments and replies:
instead they pass a show_responses flag to the entity view, which
renders the responses and passes them to the listing view.
Full discussion view now uses full listing view
Full file view now passes file preview as an attachment to the listing view
@hypeJunction
Copy link
Contributor Author

Rebased and addressed the comments.

@hypeJunction hypeJunction merged commit 9dbcedd into Elgg:master Jan 14, 2017
@hypeJunction hypeJunction deleted the object-view branch January 14, 2017 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants