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

Toggle demo clipboard visibility between JSON, and Markdown and HTML #609

Merged
merged 5 commits into from
Oct 4, 2023
Merged

Toggle demo clipboard visibility between JSON, and Markdown and HTML #609

merged 5 commits into from
Oct 4, 2023

Conversation

R055A
Copy link
Contributor

@R055A R055A commented Oct 3, 2023

Description

Add functionality to toggle between JSON, and Markdown and HTML clipboard visibility on demo site when the type variable is set to json and when not, respectively.

Fixes #572

Type of change

  • New feature (added a non-breaking change which adds functionality)

How Has This Been Tested?

  • Tested locally with a valid username
  • Tested locally with an invalid username
  • Ran tests with composer test
  • Added or updated test cases to test new features

Checklist:

  • I have checked to make sure no other pull requests are open for this issue
  • The code is properly formatted and is consistent with the existing code style
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Screenshots

between when type is set to JSON and when not
when set to JSON, markdown and HTML clipboards not visible and disabled
when not set to JSON, JSON clipboard not visible and disabled
Copy link
Owner

@DenverCoder1 DenverCoder1 left a comment

Choose a reason for hiding this comment

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

It seems like only the buttons are hidden but maybe it should be the whole section?

We could change the selectors or simply use .parentElement

Let me know what you think

image

R055A and others added 3 commits October 3, 2023 23:05
Co-authored-by: Jonah Lawrence <[email protected]>
Co-authored-by: Jonah Lawrence <[email protected]>
Co-authored-by: Jonah Lawrence <[email protected]>
@R055A
Copy link
Contributor Author

R055A commented Oct 3, 2023

It seems like only the buttons are hidden but maybe it should be the whole section?

We could change the selectors or simply use .parentElement

Let me know what you think

image

Sorry, I was unable to test using Heroku.

@DenverCoder1 DenverCoder1 temporarily deployed to streak-stats-demo-clipb-cgqtvg October 3, 2023 23:02 Inactive
@DenverCoder1
Copy link
Owner

DenverCoder1 commented Oct 3, 2023

You can test locally or in a codespace with php installed, I'll enable a review app so it can be tested on Heroku in this PR.

The View Deployment button should appear above.

Copy link
Owner

@DenverCoder1 DenverCoder1 left a comment

Choose a reason for hiding this comment

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

It seems that the copy to clipboard button for JSON is not yet working. The clipboard.copy function probably needs to be updated.

@DenverCoder1 DenverCoder1 temporarily deployed to streak-stats-demo-clipb-cgqtvg October 4, 2023 11:41 Inactive
@R055A
Copy link
Contributor Author

R055A commented Oct 4, 2023

It seems that the copy to clipboard button for JSON is not yet working. The clipboard.copy function probably needs to be updated.

Thank you for your help @DenverCoder1. The copy from clipboard functionality when the type is JSON is now fixed!

@DenverCoder1 DenverCoder1 merged commit caa9a84 into DenverCoder1:main Oct 4, 2023
@DenverCoder1
Copy link
Owner

Thanks for contributing!

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.

🚀 Demo site feature: Add alternate output types on the demo site
2 participants