Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Star/Unstar repositories #230

Merged
merged 10 commits into from
Jul 28, 2015
Merged

Star/Unstar repositories #230

merged 10 commits into from
Jul 28, 2015

Conversation

lsamayoa
Copy link
Contributor

Fixes #203

@flavio
Copy link
Member

flavio commented Jul 23, 2015

The code looks good. However I just realized we don't do any policy check inside of the Repositories controller. I'll create an issue for that.

@flavio
Copy link
Member

flavio commented Jul 23, 2015

I created issue #231

@flavio
Copy link
Member

flavio commented Jul 23, 2015

Waiting for feedback from @mssola before merging this code

@mssola
Copy link
Collaborator

mssola commented Jul 23, 2015

Awesome work! The only thing that I don't like though is that the starring is done with a redirect, which is something I'm not used to. It would be cool if you could make it work remotely (e.g. with an .js.erb file just like we do with the creation of namespaces). Thanks!

@flavio
Copy link
Member

flavio commented Jul 23, 2015

The only thing that I don't like though is that the starring is done with a redirect, which is something I'm not used to. It would be cool if you could make it work remotely (e.g. with an .js.erb file just like we do with the creation of namespaces).

Agreed, once that's is fixed we can merge the code into master.

@flavio
Copy link
Member

flavio commented Jul 24, 2015

@lsamayoa also make sure to update the changelog to cover this new feature

@lsamayoa
Copy link
Contributor Author

@flavio @mssola Updated this branch with js changes please review 👍

@flavio
Copy link
Member

flavio commented Jul 27, 2015

When I hover over the star/unstar button I get a scary message (from the user point of view): "translation missing en.Unstar" or "translation missing en.Star".

I think that happens because you wrote code like

link.html("<%= escape_javascript(t('Unstar')) %>");

But we don't have any translation in place. I would just drop the t() function right now.

Apart from that the feature works fine. The code looks good, but I'll leave @mssola the task to comment the js stuff.

@flavio
Copy link
Member

flavio commented Jul 27, 2015

Also, from a UX point of view I would drop the star/unstar button and make the star icon clickable. That's what is done usually by the other websites.

I didn't star the repository

  • The star icon is "empty"
  • I click the star icon:
    • The start icon is "full"
    • The counter increases

I already starred the repository

  • The star icon is "full"
  • I click the star icon:
    • The start icon is "empty"
    • The counter decreases

@lsamayoa
Copy link
Contributor Author

@flavio @mssola I rebased from master to make the merge easier and update changelog

@lsamayoa
Copy link
Contributor Author

@flavio @mssola BTW already ajaxified the star/unstar action

@mssola
Copy link
Collaborator

mssola commented Jul 28, 2015

I agree with @flavio . Could you please do that ?

@lsamayoa
Copy link
Contributor Author

@mssola @flavio it is already done in 13d3934

@flavio
Copy link
Member

flavio commented Jul 28, 2015

LGTM, thanks a lot

flavio added a commit that referenced this pull request Jul 28, 2015
@flavio flavio merged commit b3ca538 into SUSE:master Jul 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants