Skip to content
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

wiki index sorting bug and styling #5326

Closed
wants to merge 9 commits into from
Closed

wiki index sorting bug and styling #5326

wants to merge 9 commits into from

Conversation

GettyOrawo
Copy link
Contributor

@GettyOrawo GettyOrawo commented Apr 1, 2019

Fixes #5317

all-sorted

Managed

  • wikis can now be sorted by any of the columns.

Peculiar

  • last-edited column sorts perfectly locally but doesn't seem to work in production. So I can't reproduce the bug for sorting by last-edited.

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updation
  • ask @publiclab/reviewers for help, in a comment below

Thanks!

@plotsbot
Copy link
Collaborator

plotsbot commented Apr 1, 2019

1 Warning
⚠️ It looks like you merged from master in this pull request. Please rebase to get rid of the merge commits – you may want to rewind the master branch and rebase instead of merging in from master, which can cause problems when accepting new code!
1 Message
📖 @GettyOrawo Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.

Generated by 🚫 Danger

@GettyOrawo
Copy link
Contributor Author

@publiclab/reviewers once the tests pass would love your reviews on this please. Thank you.

@GettyOrawo
Copy link
Contributor Author

@jywarren, @gauravano the PR is ready for reviews though I can't seem to reproduce the bug for sorting by last-edited locally. It works fine on my end yet I can't tell why it breaks in production...

@grvsachdeva
Copy link
Member

Hey @GettyOrawo, I am getting unsorted result for page views

Peek 2019-04-03 17-48

Checking code now..

order_string = 'views DESC'
elsif sort_param == 'likes'
when 'page_views'
order_string = 'node.vid DESC'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here's the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gauravano , the GIF is broken so I can't see the behavior but let me give this a second look.

@GettyOrawo
Copy link
Contributor Author

Hey @gauravano can you try now? Seems to be working okay on my local.

@GettyOrawo
Copy link
Contributor Author

Sorry, is this still pending?

Copy link
Contributor

@alonpeer alonpeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jywarren
Copy link
Member

Hi all! This also looks good to me, but what is the default sorting that we fall back to? I wonder if plain /wiki is getting sorted oddly due to whatever the default sorting is?

https://publiclab.org/wiki

But I defer to @gauravano on this one. Thank you so much!!!

@jywarren
Copy link
Member

And many apologies for slow response on this one! We appreciate your help!!!!

@alonpeer
Copy link
Contributor

alonpeer commented Apr 11, 2019

The default is node_revisions.timestamp which is ?order=last_edited. It makes sense to me, since it also includes recently created page, so new pages will float to the top.

@grvsachdeva
Copy link
Member

It's working good in development but in production, many sorting options don't work right 😕. Try on https://unstable.publiclab.org/wiki?sort=last_edited

@jywarren @alonpeer @GettyOrawo thoughts?

@alonpeer
Copy link
Contributor

Can you please tell me a bit more about the unstable.publiclab.org environment? Is it using the same database as production, or is it another database with the same schema but test data, or is it maybe another database with a copy of production data?
It would be much easier for me to debug this if I could have a dump of the production DB to load locally.

@GettyOrawo
Copy link
Contributor Author

Yes @alonpeer and @gauravano I would also find it a lot easier to test this on unstable environment. How do I push to unstable? And do I need to be authorized.. I once tried and failed for not having rights.

@grvsachdeva
Copy link
Member

grvsachdeva commented Apr 21, 2019

Can you please tell me a bit more about the unstable.publiclab.org environment?

We use unstable to test changes. Only some people have push access but if you want to test your PR there, you can ask in Gitter channel and someone else can do it for you.

Is it using the same database as production, or is it another database with the same schema but test data, or is it maybe another database with a copy of production data?

It's another database with a copy from production data.

It would be much easier for me to debug this if I could have a dump of the production DB to load locally.

I think, it's not possible. Although, @icarito can better answer that.

@SidharthBansal
Copy link
Member

How is it going here?

@GettyOrawo
Copy link
Contributor Author

hey @SidharthBansal this is one of those "It works on my machine and not in production" kind of bugs. Didn't try pushing to unstable though.

@SidharthBansal
Copy link
Member

Please resolve the conflicts and try to push it on unstable

@SidharthBansal
Copy link
Member

As the person is inactive for more than a month, I am closing the PR. In case you want to push changes please feel free to open a new PR OR reopen this PR and add additional changes to it.
Thanks for contributing on Public Lab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wiki index ordering
6 participants