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

New issue templates broke form prefilling of file-issue.js script #63

Closed
not-my-profile opened this issue Sep 30, 2023 · 6 comments
Closed

Comments

@not-my-profile
Copy link

The HTML spec makes use of the file-issue.js script, which provides a "File an issue about the selected text" link in the bottom right corner that when clicked previously opened the issue form prefilled with the selected text:

    return originalFilingURL + '?title=' + encodeURIComponent(bugData.title) + '&body=' +
           encodeURIComponent(bugData.body);

The new issue templates broke this since the body URL param no longer works. Fixing this will require four steps:

  1. Updating the data-file-issue-url= in the HTML source file to include ?template=0-new-issue.yml.
  2. Updating the above code of file-issue.js to preserve existing URL parameters.
  3. Specifying id: issue-body below type: textarea in 0-new-issue.yml. (I tested it and unfortunately GitHub ignores the id if it is set to body.)
  4. Implementing a new data-body-url-param option in file-issue.js and adding data-body-url-param="issue-body" to the HTML source file.

While I took the time to figure this out, I'm not interesting in implementing these steps myself ... I'm busy polishing my HTML parser.

@annevk
Copy link
Member

annevk commented Sep 30, 2023

For me it seems to work fine, it just bypasses the templates. Is the problem here that admins can bypass the templates but other users cannot?

I wonder if we should remove file-issue.js as nobody seems to be using it anyway.

cc @zcorpan @domenic

@domenic
Copy link
Member

domenic commented Sep 30, 2023

I wonder if we should remove file-issue.js as nobody seems to be using it anyway.

I tend to agree. Although I use it myself sometimes, the only use I see from others is the mountains and mountains of spam that I'm pretty sure comes from the file-issue.js links. (It follows the same format, of just the URL of some part of the spec as the body.)

@not-my-profile
Copy link
Author

not-my-profile commented Sep 30, 2023

I think removing the script (and prefill function) would be fine ... however I do like the "File an issue" link in the corner ... perhaps we could implement the link in HTML so that it's also present without JavaScript?

(Sidenote: perhaps the new issue templates will deter some spam since it's now one more step to create an issue)

@annevk
Copy link
Member

annevk commented Oct 2, 2023

Filed whatwg/whatwg.org#426 on potentially restoring it with CSS. I'm going to remove it for now as it's indeed broken and the CSS replacement isn't necessarily better.

annevk added a commit to whatwg/html that referenced this issue Oct 2, 2023
Unfortunately it's primarily used for spammy issues. See whatwg/spec-factory#63 and whatwg/whatwg.org#426 for thoughts on reviving aspects of it at some point in the future.
annevk added a commit to speced/bikeshed-boilerplate that referenced this issue Oct 2, 2023
See whatwg/spec-factory#63 and whatwg/whatwg.org#426 for thoughts on reviving parts of it at some future point.
@zcorpan
Copy link
Member

zcorpan commented Oct 2, 2023

If it's causing spam then it's probably better to not have it.

annevk added a commit to whatwg/html that referenced this issue Oct 3, 2023
Unfortunately it's primarily used for spammy issues. See whatwg/spec-factory#63 and whatwg/whatwg.org#426 for thoughts on reviving aspects of it at some point in the future.
@annevk
Copy link
Member

annevk commented Oct 3, 2023

It's now been removed everywhere. Might take some time to roll out across all standards. There's potential for a CSS-based replacement, but it has some shortcomings as discussed in the issue referenced above.

@annevk annevk closed this as completed Oct 3, 2023
mfreed7 pushed a commit to mfreed7/html that referenced this issue Oct 11, 2023
Unfortunately it's primarily used for spammy issues. See whatwg/spec-factory#63 and whatwg/whatwg.org#426 for thoughts on reviving aspects of it at some point in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants