Problem/Motivation
Before a stable version, we need to discuss list of tasks to be done.
Proposed resolution
Requirements
- #3069201: [META] Improve the style of the Rate widgets
- #3069206: Discuss the problem of changing widgets after users voted
- #3071645: Custom widget or how to add text to a rate widget?
Done
- #2962536: Unify vote types
- #2834499: Allow more than one type of voting
Currently the type of voting used is global. Ideally, you should be able to use more than one type around the site (e.g. fivestar for a product and up/down for an article). Even better, you may want to use more than one type for the same entity bundle.
- #2998389: Allow Vote Widget on views
- #2848758: Rate cannot be used as Filter criteria
- #3064002: Allow sorting views by average votes
Remaining tasks
?
User interface changes
Possible.
Comments
Comment #1
mauritsl commented8 months from now, sure I will do that.
Pitfall is that we are dependent on votingapi. I'm not aware of Drupal 8 plans there. Other options are writing our own storage or make it pluggable, but prefer votingapi for d8.
Comment #3
Time has come commentedSorry, to reopen this.
I'm not a developer, but if I could spare a developer's capacity, I'm Interested in how much work is involved in getting Rate to be Drupal 8 ready for the community?
Or is it necessary to wait until there has been more progress on Voting API?
https://www.drupal.org/node/2203791
And is this process entirely controlled by the maintainer?
Comment #4
mauritsl commentedThere weren't any updates on the VotingAPI D8 port for 7 months now. Now sure if it will be there.
If possible - we will use the VotingAPI for storage of votes. If not - we should consider writing our own pluggable storage which can be replaced by a VotingAPI plugin later. But that will increase the amount of work to be done, while it doesn't add value in the long run.
Anyway, only the 2.x branch will be ported to D8.
Comment #5
ressaFrom Voting API #2379167: Drupal 8 port of Voting API.
Comment #6
pedrorocha commentedHi guys, does anybody knows if any development happened on Rate for D8? I already ported Voting API to D8(please see https://www.drupal.org/node/2379167) and i'm needing some feedback over the approach I chose (with Vote becoming an Entity and VoteResult becoming a D8 Plugin).
Would be great to have inputs from people that will actually extend the module, to see if it's doing good or need to change approach.
Comment #7
mauritsl commentedHi Pedo,
No yet, but D8 is coming closer. I will work on this soon.
I will take a look at VotingAPI in the coming days.
Comment #8
pedrorocha commented@mauritsl, I just released an initial 8.x version of https://www.drupal.org/project/like_and_dislike, that extends Voting API also, so you can see it as an example on how would be to work on Rate 8.x.
I'm open to every feedback at this moment, to see if the approach chose is good to go.
Comment #9
onderd commentedhi,
are you planing to relase d8x version soon or are you waiting for the drupal 8 versions of other dependencies?
Comment #10
pedrorocha commentedAny work on D8 version for Rate? I need this module features and if someone is developing, we can join forces, otherwise i'll start from scratch.
Comment #11
pedrorocha commentedI just released a Voting API alpha version(https://www.drupal.org/node/2721819), that has months of use in production, so it's stable, despite still open to feedback, feature suggestions and API changes.
I'm considering work on Rate 8.x port, so if anyone is willing to help, please let me know.
Comment #12
brenk28 commentedSee the rate D8 thread: https://www.drupal.org/node/2621706
Comment #13
vpeltot commentedI want to install this module using composer and the new Drupal packages repository (https://packages.drupal.org/8), but no packages are found for this project.
The requested package drupal/rate could not be found in any versionIn cause, only 7.x releases exists.
Can you create a new release 8.x-1.x ?
Thanks
Comment #14
kevin.dutra commentedComment #15
andypostNice to see updated summary! Makes sense to add related issues to focus contributors)
Comment #16
kevin.dutra commentedComment #17
jordik commentedCheck this issue and the patch included - it enables more than one type of voting.
https://www.drupal.org/project/rate/issues/2834499
It basically allows every entity/content type to have its own rating method.
Comment #18
jordik commentedComment #19
drdam commentedAre Emotion-like vote in the roadmap ?
Comment #20
tepelena commentedAre patches from issue 1 and 2 applied to the dev version? It would be nice to post a new release.
Comment #21
kevin.dutra commentedSorry for the lack of updates -- my schedule went a little crazy recently. I'm hoping to have some time within the next week to make some headway.
@DrDam, what do you mean by "Emotion-like"?
@tepelena, #1 is included in the alpha1 release. #2 has not been committed yet, so it wouldn't be in any release yet.
Comment #22
drdam commented@kevin.dutra : like "funny, mad, angry.." choices ? when you only can choose one
Comment #23
jordik commented@kevin.dutra - what is the reason not adding #2 Allow more than one type of voting to the release?
It is RTBC, works well with the current version, many people are asking for it etc.
Comment #24
kevin.dutra commented@JordiK: once a release is created, nothing else can be added to it. Any commits that are made after that point become part of the following release. I have every intention of adding in #2 before cutting a GA release. I was just pointing out to @tepelena that because it hasn't been committed yet, it would not be in either the alpha1 or dev releases that are currently posted.
Comment #25
tepelena commentedKevin,
Thanks for investing your time in this module. I have been watching this module closely.
On the module page it says it is not ready for D8 production sites. Once the voting issue is committed do you think it is ok to use the module on a live site? If so, you may want to remove/change D8 note on the module page.
Thanks
Comment #26
jordik commented@kevin.dutra - any indication on when #2 can be added? Want to see it in rather soon...
Comment #27
lamp5Comment #28
krzysztof domańskiComment #29
krzysztof domańskiI added new issues that should be fixed before the stable release.
#3069201: [META] Improve the style of the Rate widgets
#3069206: Discuss the problem of changing widgets after users voted
Comment #30
broonI just started to look into D8 Rate module, I have previously used the D7 version quite a while and mostly the custom widget type.
From my test installs and the issues here, I am wondering about the different approach. In D7, I could create several widgets and each of them could be assigned to one or multiple content types. They also had a title which was displayed with the actual rating widget.
Now, in D8, I can only add a single widget type to a content type. So it's not possible anymore to have two or more widgets on a node page (i.e. Thumbs Up/Down for basic rating and Fivestar for more detailed rating). Is this a technical issue or is there any other reason this has been changed? Sorry, if I appear ignorant, but I couldn't find any information on this approach.
As for the title, I already added another issue and also put that into the list here.
Comment #31
krzysztof domański1. There are 5 types of widgets available "Fivestar", "Number Up / Down", "Thumbs Up", "Thumbs Up / Down", "Yes / No". Hovewer we have only two vote types: "updown" and "fivestar".
See #2962536: Unify vote types.
2. When you add vote to "Thumbs Up / Down" and you change the type of widget to another one e.g. "Yes / No" the old vote will also appear in the new widget.
I think it will be hard to adapt it to multiple widgets on the bundle. It requires many changes.
See also #3069206: Discuss the problem of changing widgets after users voted.
Comment #32
jordik commentedI think, it would require some thoughts and (lots of) code, but it will not be as complicated, as it sounds in the first place.
It will require changing the logic of the UI settings page and the way the widget is attached to a node. If the structure of the config schema is not changing, then this should be doable. An additional advantage would be (probably) an easier upgrade from D7.
As alternative - there was a comment in one of the older issues about implementing the vote widget as a field, which can be attached to any entity type. Maybe this is also an option, which is worth discussing?
Comment #33
jordik commentedIn D7 rate widgets are stores as a separate entities. Each widget is configurable via admin/structure/rate/XX/edit.
Since all settings for Rate in D7 are stored as a configuration object in the database, the main tasks would roughly be:
- Modify the D8 rate configuration object (rate.settings) to fit the structure of the D7 config (rate_widgets).
- Adapt the UI for the new settings:
- new settings form (under admin/structure/rate)
- new widget edit form
- lists etc.
- Update hook to transfer the current config to the new structure
- Write additional test for multiple widgets on the same content type
If this option is the way forward (which I think is worth pursuing), I would rather see it implemented before we go for beta.
Comment #34
effortdee commentedPaul Broon mentioned here https://www.drupal.org/project/rate/issues/1843902#comment-13203124 that multiple widgets per node type are not possible in D8.
I don't see any other news or information about this as I too require to put a fivestar rating AND a thumbs up rating on the same node.
Rate module says this is possible but in D8 it looks like it actually isn't.
Any more info would be greatly received!
Comment #35
jordik commentedI am currently working on porting the Rate widgets form from D7 to D8.
There are two ways to pursue this:
- the Rate D7 way, where you define your widget and their options and then the module puts them on your entity OR
- you define your widgets as fields and attach them to the entity as you would do with a field.
The first option will be more close to D7 and probably will be easier to migrate your current D7 setup to D8.
The second option would have a completely new logic bring more flexibility, as it will not only allow having two different widgets on the same entity (fivestar and yesno), but also more than one of the same widget (multiple fivestar widgets) for more complex ratings.
What I currently have created and tested is the Rate Widget form (similar to the D7), where you can have multiple options (option 1).
Would be accessible under /admin/structure/rate_widgets and store the configurations differently.
Also tested the way to have Rate widget as a field (option 2). Both cases work, but there is still work to be done.
We will have to create a separate issue for this in order to track it there and keep the discussion focused.
Comment #36
tepelena commentedThanks for working on this. The option 2 sounds very promising.
Comment #37
effortdee commentedGreat work Jordik, interested in option 2 too.
Comment #38
jordik commentedCreated a separate issue to deal with D7 functionality and multiple widgets on entities.
#3112586: Multiple rate widgets per node and further D7 functionality.
Created a new logic for the rate widgets in a patch there, as in option 2 of comment #35.
Now rate widgets are stored as separate config entities and have separate settings (and possibility for custom options) - much like in D7.
The patch is ready to be tested and it should not impact your current rate widgets or data (but no warranty).
It is a massive leap towards making rate work as in D7 (or even better). Please test the initial patch and provide feedback!
This opens a way for an easier D7 migration and further flexibility.
The test patch (and this way forward) already solves the following issues of the current D8 version (just a small selection, did not check all open issues):
#3110676: Allow user to change vote without clicking undo.
#3045151: Allow multiple votes for user for single entity
#3069201: [META] Improve the style of the Rate widgets
#3069973: Validate whether a value is allowed for a given vote type
#3071645: Custom widget or how to add text to a rate widget?
#3069197: Improve the style of the "Number Up / Down" widget
In my opinion it is the way to go for Rate until beta and on a way to its first stable release.
Comment #39
ravi kant commentedNow we can roadmap for Drupal 11.
Comment #40
jordik commentedThe whole thread is 4 years old and concerns porting the D7 version to D8, which was done long ago.
Closing this as outdated.