Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#28884 closed defect (bug) (fixed)

No review stars in plugin details popup in 4.0

Reported by: hardeepasrani's profile hardeepasrani Owned by:
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Plugins Keywords:
Focuses: administration Cc:

Description

I'm not sure if there is a reason behind it, but I can't see any stars rating in the review tab of the new plugin details lightbox.

4th ticket of the day :) Sorry for that...

Attachments (6)

Review.png (214.4 KB) - added by hardeepasrani 11 years ago.
28884.patch (999 bytes) - added by BandonRandon 11 years ago.
Patch to hide the reviews tab
28884.2.patch (1.4 KB) - added by BandonRandon 11 years ago.
Fully removes the reviews tab
Screen Shot 2014-08-16 at 8.31.04 am.png (67.7 KB) - added by tellyworth 11 years ago.
Screenshot with fixed markup from the API; core patch needed to allow div/span
28884-reviews-markup-allowedtags.diff (911 bytes) - added by tellyworth 11 years ago.
Allow div/span with class
28884.dotorg.png (66.2 KB) - added by ocean90 11 years ago.

Download all attachments as: .zip

Change History (23)

@hardeepasrani
11 years ago

#1 @hardeepasrani
11 years ago

Anyone checking this out? ;/

This ticket was mentioned in IRC in #wordpress-dev by celloexpressions. View the logs.


11 years ago

#3 @celloexpressions
11 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.0

Not sure if this is doable with the .org API, but I don't think we should display reviews without their ratings. May need to consider removing the reviews tab entirely if we can't fix it.

@BandonRandon
11 years ago

Patch to hide the reviews tab

#4 @BandonRandon
11 years ago

  • Keywords has-patch added; needs-patch removed

I couldn't find where the API shows individual review rating so added a quick patch to hide the ratings tab. If someone is more familiar with the Plugin API then showing the individual ratings is preferred.

@BandonRandon
11 years ago

Fully removes the reviews tab

#5 @BandonRandon
11 years ago

Version 2 of the patch fully removed the Reviews code not just hides the tab. I was missing the if statement in the output.

#6 @ocean90
11 years ago

  • Focuses administration added
  • Keywords needs-patch added; has-patch removed

We're not going to remove the reviews tab. API changes are requested.

#7 @tellyworth
11 years ago

The ratings markup is being added but then stripped by kses on the API side. Working on that.

@tellyworth
11 years ago

Screenshot with fixed markup from the API; core patch needed to allow div/span

@tellyworth
11 years ago

Allow div/span with class

#8 @tellyworth
11 years ago

Are there any concerns with allowing those additional tags?

I'm open to other minor improvements to the reviews layout too, especially if it can be done without further core patches. That would be easier with the allowed_tags patch, since it allows divs.

This ticket was mentioned in IRC in #wordpress-dev by tellywor_. View the logs.


11 years ago

#10 @paulwilde
11 years ago

A little bit related, but judging from the above screenshot it's really hard to discern which stars belong to which review. I think some separation is needed for each review such as a <hr> line and some spacing.

#11 @SergeyBiryukov
11 years ago

In 29511:

  • Add span to the list of allowed tags in plugin sections in plugin details modal.
  • Don't strip class attribute from div/span tags in plugin sections.

props tellyworth.
see #28884.

#12 @nacin
11 years ago

[29511] looks good to me.

#13 @hardeepasrani
11 years ago

Amazing work guys!!! Time to mark it as fixed?

#14 follow-up: @ocean90
11 years ago

tellyworth, are the changes already deployed? Still can't see the review stars.

#15 in reply to: ↑ 14 @tellyworth
11 years ago

Replying to ocean90:

tellyworth, are the changes already deployed? Still can't see the review stars.

API changes are deployed, yes. Is it a particular plugin where you can't see the stars?

@ocean90
11 years ago

#16 @ocean90
11 years ago

I think we should try to use the same layout as we have on .org, see 28884.dotorg.png.

Current markup for the review header:

<div class="reviewer-info">
	<div class="review-title-section">
		<h4>{{title}}</h4>
		<div class="star-rating">
			<span class="screen-reader-text">1.0 rating</span>
			<div class="star star-full"></div>
			<div class="star star-empty"></div>	
			<div class="star star-empty"></div>
			<div class="star star-empty"></div>
			<div class="star star-empty"></div>
		</div>
	</div>
	<p>
		By <a href="{{url}}" target="_blank"><img alt="" src="{{gravatar}}" class="photo avatar avatar-16"></a>
		<a href={{url}}" target="_blank">{{name}}</a>,
		<span class="review-date">{{date}}</span>
	</p>
</div>

.org markup for the review header:

<div class="review-head">
	<div class="reviewer-avatar">
		<a href="{{url}}"><img alt="" src="{{gravatar}}" class="photo avatar avatar-36" style="height:36px; width:36px;"></a>
	</div>
	<div class="reviewer-info">
		<div class="review-title-section">
			<div class="review-stars star-holder">
				<div class="star-holder">
					<div class="star-rating" style="width: 18.4px">1 star</div>
				</div>
			</div>
			<div class="review-title" itemprop="name">{{title}}</div>
		</div>
		<div class="reviewer">
			By <a href="{{url}" class="reviewer-name" itemprop="author">{{name}}</a>,
			<span class="review-date">{{date}}</span>
		</div>
	</div>
</div>

I think it's enough to change the order of title and rating in the markup, so first rating, then title.

Last edited 11 years ago by ocean90 (previous) (diff)

#17 @ocean90
11 years ago

  • Keywords needs-patch removed
  • Resolution set to fixed
  • Status changed from new to closed

Closing as fixed, since the rating stars are now available.

For styling we have #29321.

Note: See TracTickets for help on using tickets.