TableauPageFeedbackExtension - Enable Feedback on Tableau Sites

TableauPageFeedbackExtension is a Tableau extension that generates feedback links for every page and post on a site. Each page gets a feedback_urls map added to is frontmatter with URLs for each enabled feedback type for use by templates during rendering. Additionally, URLs with $feedback:{type} markers are replaced with the actual feedback URLs in the rendered HTML.

In Templates

<%= if assigns[:feedback_urls] do %>
  <a href="<%= @feedback_urls.issue %>">Report an issue</a>
  <a href="<%= @feedback_urls.discussion %>">Start a discussion</a>
<% end %>

In Markdown Content

[Report an issue]($feedback:issue)
[Start a discussion]($feedback:discussion)

Markers for disabled feedback types are left in place.

Configuration

config :tableau, TableauPageFeedbackExtension,
  enabled: true,
  forge: :github,
  repo: "owner/repo",
  title_prefix: "Re: ",
  body_suffix: "\n\n---\nPlease describe the issue above.",
  github: [
    discussion: [category: "General"]
  ]

Forge-specific options are nested under the forge key. Each feedback type may have its own required configuration — types with missing required config are silently disabled with a warning.

3 Likes