Coder Social home page Coder Social logo

Comments (4)

no-stack-dub-sack avatar no-stack-dub-sack commented on August 12, 2024 1

@QuincyLarson Ok, thanks - let me take a look at this and see if I can dissect it to pull out only the relevant parts and make this work

from testable-projects-fcc.

QuincyLarson avatar QuincyLarson commented on August 12, 2024

I agree - if you can confirm the URL where issues should be created and the wording, we can add it to the top of the issue template on freeCodeCamp's main repo. That is where people are most likely to read it when they're opening an issue.

from testable-projects-fcc.

no-stack-dub-sack avatar no-stack-dub-sack commented on August 12, 2024

@QuincyLarson Ok, great - I can do that. The only other thing I might like to do, is maybe include whatever API that FCC uses to collect browser / OS info and populate it into the issue in this repo as well to make that part easier for campers and since that is likely a very relevant part of these issues.

Do you know where I can learn more about that? Not totally necessary but would be great, as I believe getting people to self report on that will be inconsistent

from testable-projects-fcc.

QuincyLarson avatar QuincyLarson commented on August 12, 2024

@no-stack-dub-sack here's an example of a URL that helps pre-populate these issues:

https://github.com/freecodecamp/freecodecamp/issues/new?&body=Challenge%20%5BEscape%20Sequences%20in%20Strings%5D(https%3A%2F%2Fwww.freecodecamp.com%2Fchallenges%2Fescape-sequences-in-strings)%20has%20an%20issue.%0AUser%20Agent%20is%3A%20%3Ccode%3EMozilla%2F5.0%20(Macintosh%3B%20Intel%20Mac%20OS%20X%2010_12_1)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F55.0.2883.95%20Safari%2F537.36%3C%2Fcode%3E.%0APlease%20describe%20how%20to%20reproduce%20this%20issue%2C%20and%20include%20links%20to%20screenshots%20if%20possible.%0A%0AMy%20code%3A%0A%60%60%60javascript%0A%0Avar%20myStr%20%3D%20%22FirstLine%5Cn%5C%5CSecondline%5C%5C%5CrThirdLine%22%3B%20%2F%2F%20Change%20this%20line%0A%0A%0A%0A%60%60%60%0A%0A

Here's the actual code we currently use:

export default function bugSaga(actions$, getState, { window }) {
  return actions$
    .filter(({ type }) => (
      type === types.openIssueSearch ||
      type === types.createIssue
    ))
    .map(({ type }) => {
      const {
        challengesApp: {
          challenge: challengeName,
          files
        }
      } = getState();
      const {
        navigator: { userAgent },
        location: { href }
      } = window;
      if (type === types.openIssueSearch) {
        window.open(
          'https://github.com/freeCodeCamp/freeCodeCamp/issues?q=' +
          'is:issue is:all ' +
          challengeName
        );
      }
      let textMessage = [
        'Challenge [',
        challengeName,
        '](',
        href,
        ') has an issue.\n',
        'User Agent is: <code>',
        userAgent,
        '</code>.\n',
        'Please describe how to reproduce this issue, and include ',
        'links to screenshots if possible.\n\n'
      ].join('');
      const body = filesToMarkdown(files);
      if (body.length > 10) {
        textMessage = textMessage + body;
      }
      window.open(
        'https://github.com/freecodecamp/freecodecamp/issues/new?&body=' +
        window.encodeURIComponent(textMessage),
        '_blank'
      );
      return closeBugModal();
    });
}

from testable-projects-fcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.