-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add "lock" icon and de-linkify Edit tab of "locked" wiki pages #1099
Comments
Hi! I would love to claim this issue. This will be the first time I've ever contributed to open source. |
Sure, @pyluftig! If you need help with this issue or setting up the project locally, please feel free to ask here or on our Gitter channel. |
Hi @ryzokuken I already have a question. I am trying to create and run the database, and am having some trouble. Is there anyone who could walk me through the process? |
Definitely, @pyluftig. Either explain what's exactly wrong over here or on our Gitter Channel. |
I have forked and cloned the repo, and installed mysql. When I run |
Actually, |
Okay so this is the error I am getting with just trying to use sqlite3:
There must be something obvious that I am missing - I just need to add the config info, right? |
Well, it seems you started using
This should do the trick. Run |
okay - thank you! was this listed somewhere? I was able to migrate and when trying to run locally I get an error saying |
Yes. For frontend dependencies, you'll need to run BTW, All of this stuff is listed in the installation section of our README. |
My apologies! I was looking at a different getting started view. I will use the read me!! Thank you. |
Up and running - thanks so much for the help @ryzokuken! |
Just wanted to say we're pleased and excited to receive your first open source contribution. Happy to help with anything else! Also glad that due to timezones we seem to have a 24-hour team 🕐 🕢 thanks @ryzokuken 👍 |
Hello, |
Hi, @rafeeq-123 -- have you had a look at some of our other issues? For first-time contributors, here: https://github.com/publiclab/plots2/projects/2 And more generally there are a lot of good ones here:
fto-candidate
There are a lot to choose from! |
Hi @jywarren or @ryzokuken - When I try to log in I get this error: This is blocking me from signing in, I believe. Once I can log in and add to the wiki page I should be able to see that view locally, correct? |
@jywarren when trying to run either
Doing some searching, it seems like this has been encountered before (in #708 and #854, at least) but I could not find any instructions to resolve this error. Any help would be appreciated! |
@jywarren and @ryzokuken the link above to the developers page is incorrect and broken: |
Hi, oh thank you so much -- we'd known there was a bad URL somewhere but couldn't find it... it's actually in my "saved replies" template. Just fixed it. For the RSolr issue - we are working to remove the optional Solr items from the install steps, or at least make them "discouraged" as they're not necessary for a development environment, and they can cause some serious trouble like you're seeing. But what I believe happened is that
These should both do the same thing -- just in case one doesn't work, i listed two. I hope that's helpful, thank you for your patience and again for finding that bad URL! |
@jywarren and @ryzokuken Dev Environment is Working!!! Yay! |
Way to go, @pyluftig! |
Awesome!!! |
@jywarren and @ryzokuken Are there any docs describing the app data model? What type of tag do I need to create? I thought I needed to create a |
@pyluftig: @jywarren could help you better with the specifics of this issue, but as far as I could comprehend this issue, I don't really believe you need to actually create and/or manipulate tags. Rather, for this issue, you need to just check if the current wiki in consideration has the Hope it helps |
Yes, the assumption is that people will add tags using the tagging interfaces on each page, so we don't need to worry about that here; though to test, you can just manually enter a tag in the HTML form at the bottom of a wiki or research note (in your development setup). So this line checks to see if that page (node) has a tag: <% if @node.has_tag('locked') %> As to the app data model, we should make such docs, and I'm hopeful that we can do that in relation to our model cleanup efforts (we're deprecating all the Drupal naming conventions, but slowly!). Thanks! |
@jywarren So do you want to limit who can add and remove the locked tag? Doesn't everyone then have access to adding/removing locks through the UI? Does that defeat the purpose? Maybe it would make more sense to show the lock icon when the current_user is not an admin or a moderator? UPDATE - now I see that only admins can lock pages! Cool. |
@jywarren Do you want a controller test to show this working? If so, can you guide me on how to create a tag correctly in spec land? Also, was spec was broken on the branch when I pulled it down. Are you aware of this? |
Hi -- great, and apologies that I'm not able to respond quickly on this at the moment. Here's an example controller test where a tag is added using https://github.com/publiclab/plots2/blob/master/test/functional/tag_controller_test.rb#L297-L316 Hope that's helpful and now I realize you were probably asking to add a tag for the purposes of testing, which makes a lot of sense and is a great idea. I do think we need a diagram of our models, and started working on one -- here's a draft: |
Hi @jywarren - wow! You sure get on top of things fast! Thanks for the info about how to add a tag in a spec. I will add specs on my branch. I am just curious, but have you considered limiting editing abilities through the back end and just based on whether the viewing user is an admin or a moderator? This way no one would have to worry about locking anything? And a lot could be done just based on the user's role? |
Well, this tag based locking is intended to be a very transparent type of
tagging... to be easy to do or undo, to take minimal extra code, to be
seldom used. I kind of like not creating a new interface for it, from a
code maintenance perspective. But we are slowly getting more sophisticated
about admin interfaces, so and perhaps you'd be interested in one of these
issues next?
#775
#496
We use tags for all sorts of things around the site, and it's starting to
get a bit messy looking in the tagging interface!
…On Dec 18, 2016 2:20 PM, "Paulette Luftig" ***@***.***> wrote:
Hi @jywarren <https://github.com/jywarren> - wow! You sure get on top of
things fast! Thanks for the info about how to add a tag in a spec. I will
add specs on my branch.
I am just curious, but have you considered limiting editing abilities
through the back end and just based on whether the viewing user is an admin
or a moderator? This way no one would have to worry about locking anything?
And a lot could be done just based on the user's role?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1099 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ5dxUkJDWKDIe7C4aohm-XAiovwDks5rJYeGgaJpZM4LNH0x>
.
|
Hi, @pyluftig - just wanted to say thanks again and this is now working: https://publiclab.org/about (click the caret next to the page title to expose the tabs) |
Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.
If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!
If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!
The problem
We have wiki page "locking" coming up as a feature -- it'll only be allowed by admins and moderators -- in #397.
There are several steps to completely implement this, but one easy first task is to display a "lock" icon instead of the
Edit
tab on pages that are locked.A page that'll be locked, for example, is https://publiclab.org/about -- a very high-traffic page that gets vandalized a lot.
Solution
We'll be locking by using a
locked
tag, and so we can check for that tag in the template:https://github.com/publiclab/plots2/blob/master/app/views/wiki/show.html.erb#L45
I think it makes sense to break this up over multiple lines, and instead of linking to the edit page, we can link to a wiki page explaining what locking is:
Note that this is not actually preventing people from going directly to the editing URL -- that'll happen in another section of the original #397 issue. But this is a good start and an easy addition!
Steps to Fix
Please email the developers list (see https://publiclab.org/developers) if you have questions, and take a look at our first-timers landing page for more information!
The text was updated successfully, but these errors were encountered: