question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: Mark editable regions on help posts in forum

See original GitHub issue

Describe the Issue

The forum help posts submitted by users do not show the editable parts of the code. The snippets (‘you code so far’) have boilerplate code which makes it difficult to understand the actual edits made by the user.

Steps to Reproduce

  1. On any later step in the RWD project, click Ask For Help and look at the forum post contents.

  2. The code snippet looks like so:

    <html>
       <body>
         <main>
           <h1>CatPhotoApp</h1>
           <h2>Cat Photos</h2>
           <!-- TODO: Add link to cat photos -->
           <p>Click here to view more <a href="https://freecatphotoapp.com">this is what I changed</a>.</p>
           <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
         </main>
       </body>
     </html>
    

Expected behavior

Instead of the above, maybe the code snippet should show what they changed:

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

      <p>Click here to view more <a href="https://freecatphotoapp.com">this is what I changed</a>.</p>

<!-- User Editable Region -->

      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
    </main>
  </body>
</html>

Maybe a nice to have will be to show some diff-style syntax highlighting, but the above should be a good starting point.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:26 (22 by maintainers)

github_iconTop GitHub Comments

3reactions
naomi-lgbtcommented, Jun 9, 2022

The editor knows where the editable regions are, so we could probably include the --fcc-editable-region-- markers in the forum post. 🤔

2reactions
ShaunSHamiltoncommented, Jun 9, 2022

What about just using a diff view? I will make a quick mock: https://forum.freecodecamp.org/t/forum-diff-mock/516258

Ideally, we could use a package like diff to get even more detailed output (only show the changed characters)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discussion Boards - Blackboard Student Support - UA Little ...
A Forum is an area where a topic or a group of related topics are discussed. For each Forum, the page displays the...
Read more >
Frequently Asked Questions – WordPress.org Forums
Forum moderators can mark any post resolved. Plugin and theme developers can mark posts resolved in their specific forum areas. They should have ......
Read more >
Allow changes to parts of a protected document
Use Restrict Editing to protect parts that can or can't be changed, who can make changes, find areas you can edit, or unlock...
Read more >
Users Forum Help - The Chicago Manual of Style
(To access a list of your previous posts, please see these instructions.) To delete the post, click on the “edit” button, then check...
Read more >
Quickstart for GitHub Discussions
On GitHub.com, navigate to the main page of the repository. · Under your repository name, click Settings. · Under "Features", click Set up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found