-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CPT: Render basic post details in custom post type listing #4055
Conversation
} | ||
|
||
return site.URL.replace( /^https?:\/\//, '' ).replace( /\//g, '::' ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This differs from the current implementation in that hasConflict
is not included: https://github.com/Automattic/wp-calypso/search?q=hasConflict
More background at 5836-gh-calypso-pre-oss - looks like this is intended to handle fairly extreme edge cases around Jetpack and WP.com sites ending up with the same URL, and the current implementation would need some changes to fit with a reduxified sites list. I personally think it would be ok to punt on it but wanted to mention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This differs from the current implementation in that
hasConflict
is not included: https://github.com/Automattic/wp-calypso/search?q=hasConflict
Good eyes. I must have had my blinders on when I had overlooked that part of the condition ( 🙈 ).
@enejb : There's quite a bit of background here. Do you think this is logic that needs to be preserved moving forward in the sites state? Apologies to shine light on this again, but I'm finding it difficult to find the conclusion of the previous discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aduth without it some users will not be able to access the site that they want. hasConflict
is set when it sees that a .com site has the same url as a jetpack site. It sets the primary domain of the .com site to the something.wordpress.com
even the site is domain mapped for example. This allow the user to navigate calypso without conflicts.
Since otherwise the user would not be able to land on the site that they want. Please keep it otherwise I am sure we will get someone telling us that they can't access the site.
Works as intended. Code looks good apart from the notes above. One thing worth noting, but I doubt we can do anything about it, is that featured images still show up in the listing even if the theme doesn't do anything with them: |
@nylen : Interesting, the theme's I've opened #4124 as a follow-up task for this, as there's much more to be fleshed out with regard to thumbnails in any case. |
9af00e0
to
bba3d2c
Compare
Rebased and added bba3d2c to account for site conflicts, including two new site state selectors |
@enejb : Would you mind reviewing the latest changes in bba3d2c to confirm that it covers the collisions needs well? |
bba3d2c#commitcomment-16765942:
@enejb : Good point, and one that doesn't seem to be accounted for in our current |
Thanks for the fix! |
d72d607
to
437efe0
Compare
CPT: Render basic post details in custom post type listing
This pull request seeks to continue iterating on the layout of the custom post type post listing screen, adding featured image, last edited date, a view button, and edit link to each post list entry.
Note: The layout is very much a work-in-progress and will continue to be refined over time.
Reference design: https://cloudup.com/cdHFJ0ddwl7
Implementation notes:
getSiteSlug
must have been reimplemented, as while it does currently exist on the decoratedsite
object, this is non-ideal and calculated values will be removed from the Redux store site state in the near future. SeeSite.prototype.updateComputedAttributes
for the reference implementation and Framework: redux sites contains functions #2757 as the tracking issue for site state cleanup.<PostTypePost />
will likely be split into separate components in a future iteration as each piece of the layout continues to be fleshed out.Testing instructions:
Caveats: