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

Add customization #1

Merged
merged 15 commits into from
Nov 15, 2022
Merged

Add customization #1

merged 15 commits into from
Nov 15, 2022

Conversation

wzulfikar
Copy link
Owner

@wzulfikar wzulfikar commented Nov 14, 2022

Add support for more customization:

  • Use shorter name (data-feedbackfin-button to data-unfeed-button)
  • Infer webhook endpoint from data-unfeed-button
  • Infer name and email from data-unfeed-name and data-unfeed-email
  • Allow customizing primary color via data-unfeed-primary-color (default color is #005dff)
  • Allow including additional context (raw string) via data-unfeed-context
  • Allow setting the form to open at start via data-unfeed-open
  • Allow customizing footer text

Nit:

  • Set focus to textarea after clicking the type (on changeType)

Preview (or see in jsbin):

<script src="https://unpkg.com/unfeed@^1" defer></script>

<button
    data-unfeed-button=""
    data-unfeed-name="John Doe"
    data-unfeed-email="john@example.com"
    data-unfeed-primary-color="#31ba64"
    data-unfeed-context="test at localhost"
    data-unfeed-footer="Hello world!"
    data-unfeed-open
>
    Send Feedback
  </button>

@wzulfikar wzulfikar merged commit ca45c3a into main Nov 15, 2022
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.

None yet

1 participant