edgarjs / ajaxful-rating Goto Github PK
View Code? Open in Web Editor NEWProvides a simple way to add rating functionality to your application.
Home Page: http://rdoc.info/projects/edgarjs/ajaxful-rating
Provides a simple way to add rating functionality to your application.
Home Page: http://rdoc.info/projects/edgarjs/ajaxful-rating
Hi,
At present in my app the rating is not being updated after clicking on the stars, although the value is being recorded as after a page refresh the new rating appears. In my view:
Average: <%= ratings_for @place, :static %></br>
Your Rating: <%= ratings_for @place, @user, :show_user_rating => true %>
Which generates:
Average: <div class="ajaxful-rating-wrapper" id="ajaxful_rating_no-small_place_2"><ul class="ajaxful-rating"><li class="show-value" style="width: 50.0%">Global rating average: 2.5 out of 5</li><li><span class="stars-1" title="Global rating average: 2.5 out of 5">2.5</span></li><li><span class="stars-2" title="Global rating average: 2.5 out of 5">2.5</span></li><li><span class="stars-3" title="Global rating average: 2.5 out of 5">2.5</span></li><li><span class="stars-4" title="Global rating average: 2.5 out of 5">2.5</span></li><li><span class="stars-5" title="Global rating average: 2.5 out of 5">2.5</span></li></ul></div></br>
Your Rating:
I'm using Ruby 1.9.1 and Rails 3.0.0beta3 with jQuery, any help would be much appreciated! Awesome plugin btw...
When you call <%= ajaxful_rating_style %> inside your layout file it works fine. But if I try calling it inside a view file like this:
<% content_for :header do %>
<%= ajaxful_rating_style %>
<% end %>
it doesn't work as expected. I can see in the README file that you do state it's necessary to put it into your layout file. Anyway I suggest you could call it within a view file, just the way I showed. That way you don't have to always include the CSS file in all the controllers and actions that use that layout.
In the meantime you should make more emphasis about this in the documentation because it took me a while to figure out why the helper method wasn't generating the dynamic part of the CSS.
PD: Great work
i have gotten the gem to work in its own app
but when combined with an existing app using jquery, things fall apart quickly
i noticed a framework => jquery setting, but not sure where to apply it
Ratings disappear when the div that they appear in are hidden via a simple jQuery('.blah').hide(); In other words when calling 'show' on the same div, the rating do not show up. They are still there in the HTML but are no longer styled, so I suppose this is some kind of CSS issue?
Is there any way around this?
I am running 2.2.8.2 with Rails 2.3.8.
With Ruby 1.9.1 on Rails 3 when I call helper ratings_for all the
stars.join
in the last line stars
are converted from ActiveSupport::SafeBuffer to String which later causes escaping. stars = @template.content_tag(:li, i18n(:current), :class => "show-value", :style => "width: #{width}%")
(1..rateable.class.max_stars).each do |i|
stars << star_tag(i)
end
@template.content_tag(:ul, stars, :class => "ajaxful-rating#{' small' if options[:small]}")
end
Hi! It occurs to me that when I try to print the web page, the rating does not look nice, i.e. it's 10 line s of number with underline instead of somewhat a horizontal bar.
I don't know how to solve the problem, would you please give some advices?
Hey again. Just wonder if there is any way to aggregate ratings for multiple objects. Here's an example...
I have a course object which has several rateable lessons. I don't want to make a course rateable, but I do want to be able to display an "overall rating" for the course which is simply the average rating across lessons (if there are three lessons with ratings of 5, 2, and 1 then I would want to be able to display 2.7 stars.
Alternatively, if there's a method that I can pass in a value and just have it display that in stars, I know how to calculate this average beforehand and could just pass it to this method. Do either of these functionalities exist?
Hi, where does one store the individual ratings for a given item? It wasn't clear from documentation as to where this data is stored.
Thanks in advance,
-Conrad
I'm testing out the demo app. It works fine with sqlite3, but blows up in spots when using MySQL. For example:
car.raters
ActiveRecord::StatementInvalid: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[id] = r.[user_id] WHERE r.[rateable_id] = 1 AND r.[rateable_type] = 'Car'' at line 1: SELECT DISTINCT u.* FROM users u INNER JOIN rates r ON u.[id] = r.[user_id] WHERE r.[rateable_id] = 1 AND r.[rateable_type] = 'Car'
I'm slightly behind on mysql version, fyi (5.0.51a). Perhaps that's related.
under rails 2.3.8 (ruby 1.9.1) the usage of the rails_xss plugin (adviced by rails core team) the output break and is escaped.
any solution? for now i "hacked" the gem directly and add an html_safe! in the function ratings_tag to the stars.join
I am setting up a way for users to rate other users and want to display how many ratings the average is out of. Is there an easy way to find the number of ratings for a particular object?
I had previously used the edgarjs-ajaxful_rating gem. I'm now trying to get setup with the new ajaxful_rating gem and I'm running into an issue. When I rate an article I receive an RJS error.
Element.update("ajaxful-rating-link-8167", "<ul class="ajaxful-rating"><li class="show-value" style="width: 80.0%">Global rating average: 4.0 out of 5
The error appears to be caused by my div id...
Instead of 'ajaxful-rating-link-8167' it is 'ajaxful_rating_no-small_link_8167'. Any idea how to resolve this? Where is the "no-small" coming from?
Thank you,
Chris
I just updated the gem from 2.2.6. to 2.2.8 in a production application and my cucumber test starting breaking with this error
undefined method `html_safe' for #<String:
when doing <%= ratings_for @document, :static %>
Like I said this was a working application with 2.2.6, any guidance on how to fix this?
config.gem "formtastic"
config.gem "authlogic"
config.gem 'mislav-will_paginate', :version => '~> 2.3.11', :lib => 'will_paginate',
:source => 'http://gems.github.com'
config.gem 'thoughtbot-paperclip', :lib => 'paperclip', :source => 'http://gems.github.com'
config.gem 'sitemap_generator', :lib => false, :source => 'http://gemcutter.org'
config.gem 'pdf-toolkit', :lib => 'pdf/toolkit'
config.gem "ajaxful_rating", :version => '2.2.6'
The title essentially says it all. mod_rails won't boot my app because of this. I thought it was because I wasn't vendorizing my gems, but having verifying that I've now done that correctly, I still get the error:
undefined local variable or method 'ajaxful_rater' under mod_rails, rails 2.3.8, ruby 1.8.7, debian
and am now quite simply at a loss. Shutting off ajaxful-rating and taking out all references to it result in the app starting up. At the same time, this is not an issue under ruby 1.9.2/webrick, so I'm not sure what the weak pt is here.
SQLite3::SQLException: no such column: rates.user_id: SELECT sum("rates".stars) AS sum_stars FROM "rates" WHERE ("rates".user_id = 5)
Does this project interfere with clearance gem?
I was using v2.1.5 but upgraded to take advantage of some of your improvements. I'm getting the error the below error when I try to rate an object.
NoMethodError (undefined method `rater=' for #Rate:0x106fc82b0):
What do I need to change from my old version to make it work with the new? I manually changed user_id to rater_id in the Rates table, but what else should I do?
BTW, the above error only occurs when trying to rate something with no rating so far. If you update an existing rating there is no error.
Thanks.
This line has fancy quotes instead of normal ones:
id = "ajaxful-rating-#{!params[:dimension].blank? ? “#{params[:dimension]}-” : ’’}article-#{@article.id}"
I have checked the other issues with MissingRateRoute errors and I am compliant with all results.
Users are raters and rateable. The user controller reads:
def rate
@user = @object_to_be_rated
@user.rate(params[:stars], @winner.user, params[:dimension])
#AJAX page building
render :update do |page|
page.replace_html @user.wrapper_dom_id(params), ratings_for(@user, params.merge(:wrap => false))
page.visual_effect :highlight, @user.wrapper_dom_id(params)
end
end
The routes.rb has the line:
map.resources :users, :member => {:rate => :post}
The view shows:
<%= ratings_for @object_to_be_rated, @current_user, :show_user_rating => true, :wrap => false, :allow_update => true, :dimension => :seller_rating, :method => :post %>
I am ready to give up. Cannot fathom what else to do...
Hi,
I followed the installation instruction but I get an error n every page of my web site.
Here is the error:
uninitialized constant Defi::Rate
Log:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in const_missing' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2199:in
compute_type'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in silence_warnings' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2195:in
compute_type'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/reflection.rb:156:in send' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/reflection.rb:156:in
klass'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/reflection.rb:187:in quoted_table_name' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1416:in
configure_dependency_for_has_many'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:824:in has_many' (eval):3:in
has_many'
/Library/Ruby/Gems/1.8/gems/ajaxful_rating-2.2.4/lib/axr/model.rb:21:in ajaxful_rateable' /Users/gregorymarcilhacy/Documents/projets/trunk-capoupascap/app/models/defi.rb:2 /Users/gregorymarcilhacy/Documents/projets/trunk-capoupascap/app/controllers/home_controller.rb:4:in
index'
Any idea why?
Hello,
I had a problem with jruby (unrelated?) that the id's in the page source and the replacement after a rating update did not match. I changed the code a bit and it works for me now:
--- ajaxful-rating-2.2.1.1/lib/axr/model.rb~ 2010-03-08 21:21:27.000000000 -0800
+++ ajaxful_rating-2.2.1.1/lib/axr/model.rb 2010-03-08 21:20:43.000000000 -0800
@@ -90,13 +90,13 @@
options = options.symbolize_keys.slice(:small, :dimension)
options = options.map do |k, v|
if k == :dimension
v
v.to_s
else
v.to_s == 'true' ? k.to_s : "no-#{k}"
end
prefix << "_#{options.join('_')}" unless options.empty?
prefix << "_#{options.sort.join('_')}" unless options.empty?
Hi,
I have upgraded from gem version edgarjs-ajaxful_rating (2.1.3) to gem ajaxful_rating (2.2.8.2). I replaced user_id for the rater_id field. When updating as such:
INSERT INTO rates
(rateable_type
, created_at
, rateable_id
, rater_id
, updated_at
, stars
, dimension
) VALUES('Match', '2010-11-27 17:28:31', 4197, NULL, '2010-11-27 17:28:31', 4, 'technical')
The issue is that the rater_id is not getting populated. I inserted a new column in the table: user_id and the user_id field is getting populated by the rater_id is not.
I installed the plugin and worked with the code and was able to get this to work was by adding:
def rate(stars, user, dimension = nil)
return false if (stars.to_i > self.class.max_stars)
raise AlreadyRatedError if (!self.class.axr_config[:allow_update] && rated_by?(user, dimension))
rate = if self.class.axr_config[:allow_update] && rated_by?(user, dimension)
rate_by(user, dimension)
else
returning rates(dimension).build do |r|
r.rater = user
end
end
rate.rater_id = user.id # code added by raul padilla
rate.stars = stars
rate.save!
self.update_cached_average(dimension)
end
Can't tell you if I have something that may be causing this not to work as you intended but as I have done it seems to work for me. Is it possible to add this to the gem?
Hope it helps or you can help me. Thanks for your plugin.
Raul Padilla
While trying to run "rails g ajaxful_rating User" command i get this error:
"Could not find generator ajaxful_rating."
The gem is installed, I'm working on Rails 3. How can I make it work?
I impleneted ajaxful rating on a Store model with 3 dimensions. I am
caching rating average for each dimension as well as the overall
average rating. The individual dimension rates are being saved and
shown correctly (including average per dimension) and everything works fine except, the "rating_average"
does not update (still at 0) even after multiple users have updated it
for a specific record.
getting "uninitialized constant AjaxfulRating::StarsBuilder::MissingRateRoute" on show, new, and edit
my models are "Source" and "User" and I have in my routes "map.resources :sources, :user => {:rate => :post}"
Any ideas? Thanks!
we have a site that we can't require logins for, but needs to have ratings. it would be fine if every rating was cookie based or something, or even if was completely open (anyone can put in a rating, as many times as they wanted to).
Hi,
On one of my views, I call ratings_for on like objects found via a block. If there are more than one objects found, the stars display fine for each one. However, when submitting a rating for any of these itemts, the stars for the first item change while the stars that should be associated with the item do not.
However, the ratings seems to submit fine for every item after the first. However, the first item will rate once and then never update if its stars are changed.
IS there any way of showing only the current user rates with
rates_for @model, :dimension=>:x ?
Or it will always bring together the average of all votes?
Tks!
would be great to have this nice plugin working for mongomapper as weel.
I can get to the point where the empty stars are displayed and they fill up when hovered over, but when I click them it doesn't save the rating. The code can be found at http://github.com/585connor/QA
I'm implementing ajaxful-rating for the first time, and it generates hundreds of lines of duplicate css when calling ajaxful_rating_style.
In my Vendors Controller I put the following method:
def rate
@vendor.rate(params[:stars], current_user, params[:dimension])
id = "ajaxful-rating-#{!params[:dimension].blank? ? "#{params[:dimension]}-" : ''}vendor-#{@vendor.id}"
render :update do |page|
page.replace_html id, ratings_for(@Vendor, :wrap => false, :dimension => params[:dimension], :small_stars => params[:small_stars])
page.visual_effect :highlight, id
end
end
I then display in the view#show:
<%= ratings_for @Vendor %>
I can mouse over it and see that it is 0.0/4.0 but there isn't a way to actually submit a rating.
we need a custom star width option (default is 25px) to handle a custom star image. for now we hacked the gem and change the line 62 in stars_builder.rb (function ratings_tag) to handle our image/css correctly.
In contrast to what it says in the readme you have to use
ajaxful_rater
to get the association "has_many :ratings_given" with the correct options.
While working on a project, I wanted it to work so that a user can rate another user. But I wasnt able to do it. The rateable_id and rateable_type dont get saved to the database for some reason.
Is it possible to have the user model as both the rater and rateable?
Please let me know if I've missed something.
Hello, I've just installed and set up this nice plugin.
In my view I have
<%= ratings_for @recipe, @logged_in, :static,:remote_options => {:url => 'recipes/rate/' + @recipe.id.to_s} %>
Person is the rater, Recipe is to be rated.
Its displaying a row of stars (like 40) and I cant click on any of them to submit my vote.
Can this be used w/out any dimensions? just rate the enitre model?
Thanks!
Commit 48d2ed7 broke the ability to set a custom remote url in gem 2.1.2
Hi,
I have implemented the ajaxful-rating and I am able to rate my model. BUT I don’t get any page update. in order to see the applied rating I have to reload the page.
Admittedly, I am using the ajaxful-rating gem under rather complicated circumstances:
I am able to display the global rating and under that the rating of that particular user using the following code in my view:
I do get the hover effect when mousing over the stars due to including <%= ajaxful_rating_style %> in my layout file.
When clicking a star the rating is kind of indicated by keeping number of rated stars in the hover state (red/orange). The rating does take place due to my controller functions:
def rate
@record = User.find(params[:id])
@record.rate(params[:stars], current_user, params[:dimension])
render :update do |page|
page.replace_html @record.wrapper_dom_id(params), ratings_for(@record, params.merge(:wrap => false))
page.visual_effect :highlight, @record.wrapper_dom_id(params)
end
end
The rating is applied and the average is calculated which can be seen upon reloading the page. But the ajax part of updating the star rating upon click does not happen. Instead I do get the following error in the logs:
NameError (Constant AjaxfulRating::MissingRateRoute from ajaxful_rating/missing_rate_route.rb not found Constant MissingRateRoute from missing_rate_route.rb not found): desert (0.5.1) lib/desert/rails/dependencies.rb:56:in `look_for_constant_in_parent_module' desert (0.5.1) lib/desert/rails/dependencies.rb:13:in `load_missing_constant' /home/helmerj/.rvm/gems/ree-1.8.7-2010.02/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing' /home/helmerj/.rvm/gems/ree-1.8.7-2010.02/gems/ajaxful_rating-2.2.8.1/lib/axr/stars_builder.rb:52:in `apply_stars_builder_options!' /home/helmerj/.rvm/gems/ree-1.8.7-2010.02/gems/ajaxful_rating-2.2.8.1/lib/axr/stars_builder.rb:10:in `initialize' /home/helmerj/.rvm/gems/ree-1.8.7-2010.02/gems/ajaxful_rating-2.2.8.1/lib/axr/helpers.rb:82:in `new' /home/helmerj/.rvm/gems/ree-1.8.7-2010.02/gems/ajaxful_rating-2.2.8.1/lib/axr/helpers.rb:82:in `ratings_for' app/controllers/admin/users_controller.rb:125:in `rate' app/controllers/admin/users_controller.rb:124:in `rate' haml (3.0.15) lib/sass/plugin/rack.rb:41:in `call' Rendered rescues/_trace (71.6ms) Rendered rescues/_request_and_response (0.5ms) Rendering rescues/layout (internal_server_error)
My routes for this rating looks like this:
map.namespace :admin do |admin| admin.resources :users, :member => {:rate => :post}, :active_scaffold => true end
I am so close, any help on this would be greatly appreciated.
Cheers J.
I apologize if I'm missing something, but it seems like the rating system would be much more suited for practical use if the number of ratings is accessible.
For example, a user might want to know if 100 people have given an article a good rating, in which case the recommendation is very reliable, vs one person, in which case the recommendation is not as reliable.
I would like to inline the stars right next to the previous element in the HTML
I am using this HAML
And it keeps putting the rating below the link to the track.
I'm a rails newbies so please forgive me if i'm doing something stupid.
I am trying to install the rails 3 beta of ajaxful_rating by doing 'gem install ajaxful_rating --pre', it says it installed. but i can't find the generators anywhere?
Hi there
Can someone help me with this plz. I typed: ruby script/plugin install git://github.com/edgarjs/ajaxful-rating.git to install the plugin, then it just returned an new line, and it also creates a empty fold in the vendor\plugins\ajaxful-rating. As I follow the instructions I get "undefined local variable or method `ajaxful_rateable' for", It looks like the plugin never installed..
Thx
Let's say you have the following in your view:
<%= ratings_for @Publication, :show_user_rating => true %>
When you submit a rating, the number of stars does not change. But if you reload the page, you notice that the rating has been successfully submited - number of stars has changed.
Workaround:
<%= ratings_for @Publication, :show_user_rating => true,:dimension => nil %>
Cause of the bug:
@rated_model.wrapper_dom_id({"small"=>"false", "id"=>"5", "stars"=>"1", "dimension"=>""} )
=> "_ajaxful_rating_no-small_publication_1"
@rated_model.wrapper_dom_id({"small"=>"false", "id"=>"5", "stars"=>"1"} )
=> "ajaxful_rating_no-small_publication_1"
Notice that the second method call returns a string that does not begin with an underscore, because the parameter dimension is nil.
Is it ok to have dimensions like "Product And Service Quality"?
If yes, what would be the cached average rating column name?
Thanks
Hello,
I've just updated from 2.1.3 to 2.2.4. I have executed again the ajaxful_rating generator, I have updated the database, the images and the stylesheet.
Everithing is working but when I try to rate an object, it raises a pop up that says:
RJS error:
TypeError: element is null
And then a second pop up that says:
Element.update("_ajaxful_rating_no-small_publication_2", "<ul class="ajaxful-rating"><li class="show-value" style="width: 80.0%">Global rating average: 4.0 out of 5
After that, the stars remain blank, but when I reload the page, I realize that the rating has been stored.
Any suggestion??
Thank you very much in advance, keep up this great work!!
Suppose a user has delete an item which was ratable. How do I delete the rating?
Hi, I followed the instructions...needed to add a rake db:migrate that wasn't there...but anyway...I can display the rates when I put it into the show...but how do I submit? No ajax behavior occurs when I mouse over it....am I missing something?
I checked out the demo....just saw code in the show -- and I added the def rate to the ratedobject model.
Wouldn't that be a better name?
Could you add support for renaming the model in the options hash given to ajaxful_rateable?
ajaxful_rateable :class_name=>'Rating'
as it is already possible to customize the class_name in
ajaxful_rater
Hi,
With rails3 I get this message
The {{key}} interpolation syntax in I18n messages is deprecated. Please use %{key} instead. /Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:162:in `interpolate' /Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:157:in `gsub' /Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:157:in `interpolate' /Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:197:in `preserve_encoding' /Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:156:in `interpolate' /Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:49:in `translate' /Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n.rb:152:in `t' /Library/Ruby/Gems/1.8/bundler/gems/ajaxful-rating-85221d1/lib/axr/locale.rb:26:in `i18n' /Library/Ruby/Gems/1.8/bundler/gems/ajaxful-rating-85221d1/lib/axr/stars_builder.rb:65:in `ratings_tag' /Library/Ruby/Gems/1.8/bundler/gems/ajaxful-rating-85221d1/lib/axr/stars_builder.rb:111:in `wrapper_tag' /Library/Ruby/Gems/1.8/bundler/gems/ajaxful-rating-85221d1/lib/axr/stars_builder.rb:23:in `render' /Library/Ruby/Gems/1.8/bundler/gems/ajaxful-rating-85221d1/lib/axr/helpers.rb:83:in `ratings_for'
To avoid it I had to change lib/axr/locale.rb like this:
DEFAULTS = { :user_rating => "Your rating: %{value} out of %{max}", :global_average => "Global rating average: %{value} out of %{max}", :hover => "Rate %{value} out of %{max}" }
May be you could commit a fix with this ?
Thx.
Hello,
given that I have an article with n users who have rated the article, I would like to be able to list all the user with their rate. something like that:
<% @article.rates.users.each do |user| %>
<%= ratings_for @Article, :static, user, :show_user_rating => true %>
<% end %>
and the stars being :static
is there a way to do that?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.