Skip to content

Added code.json preview window with copy to clipboard functionality#35

Merged
natalialuzuriaga merged 6 commits intomainfrom
nat/json-preview
Mar 17, 2025
Merged

Added code.json preview window with copy to clipboard functionality#35
natalialuzuriaga merged 6 commits intomainfrom
nat/json-preview

Conversation

@natalialuzuriaga
Copy link
Copy Markdown
Contributor

@natalialuzuriaga natalialuzuriaga commented Mar 4, 2025

Problem

Currently we offer a local download of the code.json file. We would like to offer other ways for people to obtain the file content. Additionally, the site is missing a favicon
Addresses #34

Solution

  • Submit button no longer triggers local download of file. Instead, it creates code.json contents shown in a preview window
  • Created a copy button which copies content to keyboard
  • Created a download button which triggers local download
  • Added favicon.ico of DSAC logo

Result

To save code.json, users can now copy content to clipboard
Screenshot 2025-03-07 at 11 28 49 AM

Test Plan

Tested locally

python3 -m http.server 8000  

Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
@decause-gov
Copy link
Copy Markdown
Contributor

IDEA: Make the 'copy/download' links into buttons, and change the 'create' to 'generate' on the existing button.

Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
@natalialuzuriaga
Copy link
Copy Markdown
Contributor Author

IDEA: Make the 'copy/download' links into buttons, and change the 'create' to 'generate' on the existing button.

Updated!
Screenshot 2025-03-07 at 11 28 49 AM

@natalialuzuriaga natalialuzuriaga marked this pull request as ready for review March 7, 2025 19:31
Copy link
Copy Markdown
Contributor

@decause-gov decause-gov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1 🚢

@natalialuzuriaga natalialuzuriaga merged commit c3fded8 into main Mar 17, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants