User Controls

Problem setting up ISS

  1. #21
    Lanny Bird of Courage
    Originally posted by Odigo Messenger - Now With Free 911 Service I can't figure out how to do a PR. Maybe it's cos I have a clone of the repo, but I need a fork? I dunno.

    Anyway suggest the following change to stop multiple quote requests being submitted:

    ISS\ISS\static-src\src\thread\thread.js
    Line 10: if(!e.detail || e.detail == 1){ //Only allows the first click
    Line 22: }}); //close brackets

    yeah, to do a PR through github you need to fork the repo. Typically you'd fork first and clone from your fork rather than mine, but you can change it pretty easily. After forking the repo do:


    $ git remote add upstream https://github.com/Lanny/ISS # Add a link to my fork so you can pull future changes if necessary
    $ git remote set-url origin https://github.com/<your_username>/ISS.git # Set origin from my fork to your fork so you can push
    $ git push origin master # Push your changes up to your fork


    and then go to either my ISS fork or yours and you should see the option to open a pull request.

    This is a good feature add, it seems rare enough that anyone would want to quote the same post twice that it's worth disabling the button entirely after it's been clicked. Instead of setting the `detail` key on the element reference I'd suggest setting the `aria-disabled` property. That way I can apply a visual treatment to the quote button (actually a link that looks like a button), we can disable the button via markup if necessary, and the element can be requeried without losing it's enabled/disabled state. Also it's nicer for people using assistive technologies and bots.

    I can make the change myself if you want, but I'd suggest opening a PR. Github style PRs (including what you see in bitbucket and gitlab) are pretty much the standard OSS contribution flow these days so it would be good to get a feel for it. I'm happy to walk you through the process if you have any questions, git, or even new git workflows, can be kinda intimidating when you first encounter them.
  2. #22
    Odigo Messenger - Now With Free 911 Service Houston [back fudge my lingam]
    Ok. When you test the front end do you literally do
    cd ISS/static-src/;gulp generate; cd ../..;./manage.py runserver
    each time you want to test a change, or do you just set up gulp watch some way or other?
  3. #23
    cupocheer Space Nigga [unwillingly condescend the dp]
    Originally posted by Lanny yeah, to do a PR through github you need to fork the repo. Typically you'd fork first and clone from your fork rather than mine, but you can change it pretty easily. After forking the repo do:


    $ git remote add upstream https://github.com/Lanny/ISS # Add a link to my fork so you can pull future changes if necessary
    $ git remote set-url origin https://github.com/<your_username>/ISS.git # Set origin from my fork to your fork so you can push
    $ git push origin master # Push your changes up to your fork


    and then go to either my ISS fork or yours and you should see the option to open a pull request.

    This is a good feature add, it seems rare enough that anyone would want to quote the same post twice that it's worth disabling the button entirely after it's been clicked. Instead of setting the `detail` key on the element reference I'd suggest setting the `aria-disabled` property. That way I can apply a visual treatment to the quote button (actually a link that looks like a button), we can disable the button via markup if necessary, and the element can be requeried without losing it's enabled/disabled state. Also it's nicer for people using assistive technologies and bots.

    I can make the change myself if you want, but I'd suggest opening a PR. Github style PRs (including what you see in bitbucket and gitlab) are pretty much the standard OSS contribution flow these days so it would be good to get a feel for it. I'm happy to walk you through the process if you have any questions, git, or even new git workflows, can be kinda intimidating when you first encounter them.

    I missed your guidance and advice in the DH forums. After you left I decided to not try to learn anything technical about computing. Thanks for mentoring?
  4. #24
    Lanny Bird of Courage
    Originally posted by Odigo Messenger - Now With Free 911 Service Ok. When you test the front end do you literally do
    cd ISS/static-src/;gulp generate; cd ../..;./manage.py runserver
    each time you want to test a change, or do you just set up gulp watch some way or other?

    I open up two terminals, run `gulp watch` from the ISS/static-src directory in one, and `./manage.py runserver` from the top directory in the other. They both have auto-reloading so no need to restart anything (except when adding new files, gulp watch has to be restarted in that case). I rarely ever run `gulp generate`, it's more there for automated builds.
    The following users say it would be alright if the author of this post didn't die in a fire!
  5. #25
    DontTellEm Black Hole
    Lanny is a peice of shit & I love him.
  6. #26
    Lanny Bird of Courage
    this thread has a topic. If your post doesn't relate to it then don't post. I'm looking at you cupo and DTE. Random replies to this post are off topic too.
  7. #27
    Odigo Messenger - Now With Free 911 Service Houston [back fudge my lingam]
    Git is giving me a weird error.

    error: unable to create file ISS/static-src/src/assets/gif/pokeme2?.gif: Invalid argument

    Windows users are unable to have question marks in their file names, although of course there are no question marks in your filename as it appears on github. Some sort of weird encoding error or something?

    I've tried trouble-shooting it, I'll just shoah my ISS and start from scratch.

    EDIT: OK the problem was in my fork, you committed with a ? at some stage and I never updated it.
  8. #28
    Lanny Bird of Courage
    Ah yeah, sorry about that. That's some bad luck, that file with a question mark was in the repo for like a couple of hours at most, you would have had to have pulled or created your fork in that brief window to get that issue.
  9. #29
    Odigo Messenger - Now With Free 911 Service Houston [back fudge my lingam]
    Would you have the quote button be a specific CSS class when it's disabled? Or just for the duration of the ajax request to fetch quote? It is mostly a mobile issue.

    Although then again maybe you don't WANT multiple quotes, although maybe it's funny sometimes (usually not so much).

    Ideally for long quotes when you divide them up with a "return" they should form new closing and opening quote bbcodes. So if I wanted to address a particular point in a long wall text I could just click below it, hit enter, and the /quote would appear automatically.

    I have no idea how to do this, but I've been looking at how some other sites do javascript text manipulation.
  10. #30
    Lanny Bird of Courage
    Originally posted by Odigo Messenger - Now With Free 911 Service Would you have the quote button be a specific CSS class when it's disabled? Or just for the duration of the ajax request to fetch quote? It is mostly a mobile issue.

    Although then again maybe you don't WANT multiple quotes, although maybe it's funny sometimes (usually not so much).

    I was thinking of disabling it "permanently", like until the page is reloaded, although it should be reenabled if the ajax call for the quote body fails. No class needs to be added, the `aria-disabled` property should be added (in the case of links, just the `disabled` property for buttons/input elements). The styling should already be there (if you pull from my fork).

    Ideally for long quotes when you divide them up with a "return" they should form new closing and opening quote bbcodes. So if I wanted to address a particular point in a long wall text I could just click below it, hit enter, and the /quote would appear automatically.

    I have no idea how to do this, but I've been looking at how some other sites do javascript text manipulation.

    I've thought that would be a cool feature for a while now, the amount of time I spent typing out quote tags when dicing up posts is unfortunate. I don't think it will be super simple though. You'll essentially need to parse the content at some point (maybe good parsing, maybe some half-assed ad-hoc thing will be sufficient, not sure) in order to know if a given edit requires splitting a quote or not. I think you'll need some understanding of the user operation, like if I press enter with my cursor in the middle of a quote it should split it, what should happen if I start typing on an empty line within a quote? If I delete a word? Should those try to split the content somehow? What if a split occurs in the middle of a piece of text wrapped in a bold tag, should you try to close any hanging tags? What if the original post had a hanging tag? What happens with nested quotes?

    I don't think the feature is impossible to implement, I just think you run into some questions about problem definition pretty quickly.
Jump to Top