The personal finance app for everyone (by everyone)
Ruby
Remove Intercom integration (#51)
Juan José Mata656f7e9495ed
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.mdindex 4f1db63db3..017ecc0a3b 100644--- a/.github/ISSUE_TEMPLATE/bug_report.md+++ b/.github/ISSUE_TEMPLATE/bug_report.md@@ -1,7 +1,7 @@---name: Bug reportabout: Open a bug report when you experience broken functionality within the latest- version of the Maybe app+ version of the Sure apptitle: 'Bug: [Add descriptive title here]'labels: ''assignees: ''@@ -13,13 +13,13 @@ assignees: ''### General checklist- [ ] I have removed personal / sensitive data from screenshots and logs-- [ ] I have searched [existing issues](https://github.com/maybe-finance/maybe/issues?q=is:issue) and [discussions](https://github.com/maybe-finance/maybe/discussions) to ensure this is not a duplicate issue+- [ ] I have searched [existing issues](https://github.com/we-promise/sure/issues?q=is:issue) and [discussions](https://github.com/we-promise/sure/discussions) to ensure this is not a duplicate issue-### How are you using Maybe?+### How are you using Sure?-- [ ] I am a paying Maybe customer (hosted version)- - Paying Maybe users can also open requests in Intercom (if there is sensitive info involved)-- [ ] I am a self-hosted user+- [ ] I was a paying Maybe customer (hosted version)+- [ ] I use it on PikaPod, Umbrel or similar (VPS included)+- [ ] I am a self-hosted user (local only)### Self hoster checklist@@ -28,11 +28,12 @@ _Paying, hosted users should delete this entire section._If you are a self-hosted user, please complete all of the information below. Issues with incomplete information will be marked as `Needs Info` to help our small team prioritize bug fixes.- Self hosted app commit SHA (find in user menu): [enter commit sha here]- - [ ] I have confirmed that my app's commit is the latest version of Maybe+ - [ ] I have confirmed that my app's commit is the latest version of Sure- Where are you hosting?- [ ] Render- [ ] Docker Compose- [ ] Umbrel+ - [ ] PikaPod- [ ] Other (please specify)---@@ -43,7 +44,7 @@ A clear and concise description of what the bug is.### To Reproduce-Be as specific as possible so Maybe maintainers can quickly reproduce the bug you're experiencing.+Be as specific as possible so Sure contributors can quickly reproduce the bug you're experiencing.Steps to reproduce the behavior:diff --git a/.github/ISSUE_TEMPLATE/other.md b/.github/ISSUE_TEMPLATE/other.mdindex 87b1412748..d87ba85a96 100644--- a/.github/ISSUE_TEMPLATE/other.md+++ b/.github/ISSUE_TEMPLATE/other.md@@ -11,17 +11,17 @@ assignees: ''### Is this a bug?-A bug is _broken functionality_ of the app (i.e. it prevents you from using the app). For bugs, please use the ["Bug Report" template](https://github.com/maybe-finance/maybe/issues) instead.+A bug is _broken functionality_ of the app (i.e. it prevents you from using the app). For bugs, please use the ["Bug Report" template](https://github.com/we-promise/sure/issues) instead.### Is this a bug with _sensitive info_?-If you are a _paying_ Maybe user, you can open a support request in Intercom.+Make sure you feel comfortable with what you share.### Is this a feature request?-A feature request is functionality that you would like that is not already on our [Roadmap](https://github.com/maybe-finance/maybe/wiki/Roadmap).+A feature request is functionality that you would like that is not already on our [Roadmap](https://github.com/we-promise/sure/wiki/Roadmap) (coming soon!).-All feature requests should be opened in a [Feature request Discussion](https://github.com/maybe-finance/maybe/discussions/categories/feature-requests).+All feature requests should be opened in a [Feature request Discussion](https://github.com/we-promise/sure/discussions/categories/feature-requests).Be sure to search existing discussions prior to opening a new feature request.@@ -29,8 +29,8 @@ Be sure to search existing discussions prior to opening a new feature request.If you are having a Docker configuration issue, please do not open a Github issue unless you've identified a bug in our Dockerfile. To get help with self hosting, there are several options:-- **First**: Read our [Docker hosting guide](https://github.com/maybe-finance/maybe/tree/main/docs/hosting/docker.md) and follow it step-by-step-- Open a [Docker Discussion](https://github.com/maybe-finance/maybe/discussions/categories/docker-compose-hosting)+- **First**: Read our [Docker hosting guide](https://github.com/we-promise/sure/tree/main/docs/hosting/docker.md) and follow it step-by-step+- Open a [Docker Discussion](https://github.com/we-promise/sure/discussions/categories/docker-compose-hosting)---diff --git a/Gemfile b/Gemfileindex 2b08768a7a..a0db4f0ac7 100644--- a/Gemfile+++ b/Gemfile@@ -68,7 +68,6 @@ gem "tzinfo-data", platforms: %i[windows jruby]gem "csv"gem "redcarpet"gem "stripe"-gem "intercom-rails"gem "plaid"gem "rotp", "~> 6.3"gem "rqrcode", "~> 3.0"diff --git a/Gemfile.lock b/Gemfile.lockindex d88d4703bb..82366a0c2c 100644--- a/Gemfile.lock+++ b/Gemfile.lock@@ -262,9 +262,6 @@ GEMinline_svg (1.10.0)activesupport (>= 3.0)nokogiri (>= 1.6)- intercom-rails (1.0.6)- activesupport (> 4.0)- jwt (~> 2.0)io-console (0.8.0)irb (1.15.2)pp (>= 0.6.0)@@ -650,7 +647,6 @@ DEPENDENCIESimage_processing (>= 1.2)importmap-railsinline_svg- intercom-railsjbuilderjwtletter_openerdiff --git a/app/javascript/controllers/intercom_controller.js b/app/javascript/controllers/intercom_controller.jsdeleted file mode 100644index f22d1db8a2..0000000000--- a/app/javascript/controllers/intercom_controller.js+++ /dev/null@@ -1,8 +0,0 @@-import { Controller } from "@hotwired/stimulus";--// Connects to data-controller="intercom"-export default class extends Controller {- show() {- Intercom("show");- }-}diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erbindex c053e04df9..02854276b2 100644--- a/app/views/layouts/application.html.erb+++ b/app/views/layouts/application.html.erb@@ -60,10 +60,11 @@</ul><div class="pl-2 mt-auto mx-auto flex flex-col gap-2">- <%= render DS::Button.new(+ <%= render DS::Link.new(variant: "icon",icon: "message-circle-question",- data: { action: "intercom#show" }+ href: "https://discord.gg/36ZGBsxYEK",+ target: "_blank") %><%= render "users/user_menu", user: Current.user %>diff --git a/app/views/layouts/shared/_htmldoc.html.erb b/app/views/layouts/shared/_htmldoc.html.erbindex 30887f7b2e..e45d91f784 100644--- a/app/views/layouts/shared/_htmldoc.html.erb+++ b/app/views/layouts/shared/_htmldoc.html.erb@@ -5,7 +5,7 @@<htmllang="en"data-theme="<%= theme %>"- data-controller="theme intercom"+ data-controller="theme"data-theme-user-preference-value="<%= Current.user&.theme || "system" %>"class="h-full text-primary overflow-hidden lg:overflow-auto font-sans <%= @os %>"><head>diff --git a/app/views/pages/feedback.html.erb b/app/views/pages/feedback.html.erbindex e2e1ab0593..4dfff135c3 100644--- a/app/views/pages/feedback.html.erb+++ b/app/views/pages/feedback.html.erb@@ -4,26 +4,19 @@<h2 class="text-lg font-medium text-primary mb-1">Leave feedback</h2><p class="text-sm text-secondary mb-4">Let us know if you have any specific feedback. Feel free to include links to videos or screenshots.</p><div class="flex flex-col md:flex-row gap-4">- <%= link_to "https://github.com/maybe-finance/maybe/discussions/categories/feature-requests", target: "_blank", rel: "noopener noreferrer", class: "w-full md:w-1/3 flex flex-col items-center p-4 border border-alpha-black-25 rounded-xl hover:bg-container-hover" do %>+ <%= link_to "https://github.com/we-promise/sure/discussions/categories/feature-requests", target: "_blank", rel: "noopener noreferrer", class: "w-full md:w-1/3 flex flex-col items-center p-4 border border-alpha-black-25 rounded-xl hover:bg-container-hover" do %><%= image_tag "github-icon.svg", class: "w-8 h-8 mb-2" %><span class="text-sm font-medium text-primary text-center">Write a feature request</span><% end %>- <% if self_hosted? %>- <%= link_to "https://github.com/maybe-finance/maybe/issues/new?assignees=&labels=bug&template=bug_report.md&title=", target: "_blank", rel: "noopener noreferrer", class: "w-full md:w-1/3 flex flex-col items-center p-4 border border-alpha-black-25 rounded-xl hover:bg-container-hover" do %>- <%= image_tag "github-icon.svg", class: "w-8 h-8 mb-2" %>- <span class="text-sm font-medium text-primary text-center">File a bug report</span>- <% end %>- <% else %>- <%= tag.button class: "w-full md:w-1/3 flex flex-col gap-2 items-center p-4 border border-alpha-black-25 rounded-xl hover:bg-container-hover", data: { action: "intercom#show" } do %>- <%= image_tag "github-icon.svg", class: "w-8 h-8 mb-2" %>- <span class="text-sm font-medium text-primary text-center">File a bug report</span>- <% end %>+ <%= link_to "https://github.com/we-promise/sure/issues/new?assignees=&labels=bug&template=bug_report.md&title=", target: "_blank", rel: "noopener noreferrer", class: "w-full md:w-1/3 flex flex-col items-center p-4 border border-alpha-black-25 rounded-xl hover:bg-container-hover" do %>+ <%= image_tag "github-icon.svg", class: "w-8 h-8 mb-2" %>+ <span class="text-sm font-medium text-primary text-center">File a bug report</span><% end %>- <%= link_to "https://link.maybe.co/discord", target: "_blank", rel: "noopener noreferrer", class: "w-full md:w-1/3 flex flex-col items-center p-4 border border-alpha-black-25 rounded-xl hover:bg-container-hover" do %>+ <%= link_to "https://discord.gg/36ZGBsxYEK", target: "_blank", rel: "noopener noreferrer", class: "w-full md:w-1/3 flex flex-col items-center p-4 border border-alpha-black-25 rounded-xl hover:bg-container-hover" do %><%= image_tag "discord-icon.svg", class: "w-8 h-8 mb-2" %>- <span class="text-sm font-medium text-primary text-center">Discuss Maybe with others</span>+ <span class="text-sm font-medium text-primary text-center">Discuss Sure with others</span><% end %></div></div>diff --git a/app/views/users/_user_menu.html.erb b/app/views/users/_user_menu.html.erbindex fcc2d68818..1e46ee0c0c 100644--- a/app/views/users/_user_menu.html.erb+++ b/app/views/users/_user_menu.html.erb@@ -20,10 +20,10 @@<div class="px-4 py-3 border-t border-tertiary"><p class="text-sm"><span class="font-medium text-primary">Version:</span>- <%= link_to Maybe.version.to_release_tag, "https://github.com/maybe-finance/maybe/releases/tag/#{Maybe.version.to_release_tag}", target: "_blank", class: "hover:underline" %>+ <%= link_to Maybe.version.to_release_tag, "https://github.com/we-promise/sure/releases/tag/#{Maybe.version.to_release_tag}", target: "_blank", class: "hover:underline" %><% if Maybe.commit_sha.present? %>- (<%= link_to Maybe.commit_sha.first(7), "https://github.com/maybe-finance/maybe/commit/#{Maybe.commit_sha}", target: "_blank", class: "hover:underline" %>)+ (<%= link_to Maybe.commit_sha.first(7), "https://github.com/we-promise/sure/commit/#{Maybe.commit_sha}", target: "_blank", class: "hover:underline" %>)<% end %></p></div>@@ -35,10 +35,8 @@<% if self_hosted? %><% menu.with_item(variant: "link", text: "Feedback", icon: "megaphone", href: feedback_path) %>- <% menu.with_item(variant: "link", text: "Contact", icon: "message-square-more", href: "https://link.maybe.co/discord") %>- <% else %>- <% menu.with_item(variant: "button", text: "Contact", icon: "message-square-more", data: { action: "intercom#show" }) %><% end %>+ <% menu.with_item(variant: "link", text: "Contact", icon: "message-square-more", href: "https://discord.gg/36ZGBsxYEK") %><% menu.with_item(variant: "divider") %>diff --git a/config/initializers/intercom.rb b/config/initializers/intercom.rbdeleted file mode 100644index e31c389e4d..0000000000--- a/config/initializers/intercom.rb+++ /dev/null@@ -1,125 +0,0 @@-if ENV["INTERCOM_APP_ID"].present? && ENV["INTERCOM_IDENTITY_VERIFICATION_KEY"].present?- IntercomRails.config do |config|- # == Intercom app_id- #- config.app_id = ENV["INTERCOM_APP_ID"]-- # == Intercom session_duration- #- # config.session_duration = 300000- # == Intercom secret key- # This is required to enable Identity Verification, you can find it on your Setup- # guide in the "Identity Verification" step.- #- config.api_secret = ENV["INTERCOM_IDENTITY_VERIFICATION_KEY"]-- # == Enabled Environments- # Which environments is auto inclusion of the Javascript enabled for- #- config.enabled_environments = [ "production" ]-- # == Current user method/variable- # The method/variable that contains the logged in user in your controllers.- # If it is `current_user` or `@user`, then you can ignore this- #- config.user.current = Proc.new { Current.user }-- # == Include for logged out Users- # If set to true, include the Intercom messenger on all pages, regardless of whether- # The user model class (set below) is present.- config.include_for_logged_out_users = true-- # == User model class- # The class which defines your user model- #- # config.user.model = Proc.new { User }-- # == Lead/custom attributes for non-signed up users- # Pass additional attributes to for potential leads or- # non-signed up users as an an array.- # Any attribute contained in config.user.lead_attributes can be used- # as custom attribute in the application.- # config.user.lead_attributes = %w(ref_data utm_source)-- # == Exclude users- # A Proc that given a user returns true if the user should be excluded- # from imports and Javascript inclusion, false otherwise.- #- # config.user.exclude_if = Proc.new { |user| user.deleted? }-- # == User Custom Data- # A hash of additional data you wish to send about your users.- # You can provide either a method name which will be sent to the current- # user object, or a Proc which will be passed the current user.- #- config.user.custom_data = {- family_id: Proc.new { Current.family.id },- name: Proc.new { Current.user.display_name if Current.user.display_name != Current.user.email },- "Role": Proc.new { Current.user.role },- "Connections": Proc.new { Current.family.accounts.count },- "AI Enabled": Proc.new { Current.user.ai_enabled }- }-- # == Current company method/variable- # The method/variable that contains the current company for the current user,- # in your controllers. 'Companies' are generic groupings of users, so this- # could be a company, app or group.- #- config.company.current = Proc.new { Current.family }- #- # Or if you are using devise you can just use the following config- #- # config.company.current = Proc.new { current_user.company }-- # == Exclude company- # A Proc that given a company returns true if the company should be excluded- # from imports and Javascript inclusion, false otherwise.- #- # config.company.exclude_if = Proc.new { |app| app.subdomain == 'demo' }-- # == Company Custom Data- # A hash of additional data you wish to send about a company.- # This works the same as User custom data above.- #- # config.company.custom_data = {- # :number_of_messages => Proc.new { |app| app.messages.count },- # :is_interesting => :is_interesting?- # }- config.company.custom_data = {- accounts_count: Proc.new { |family| family.accounts.count }- }-- # == Company Plan name- # This is the name of the plan a company is currently paying (or not paying) for.- # e.g. Messaging, Free, Pro, etc.- #- # config.company.plan = Proc.new { |current_company| current_company.plan.name }-- # == Company Monthly Spend- # This is the amount the company spends each month on your app. If your company- # has a plan, it will set the 'total value' of that plan appropriately.- #- # config.company.monthly_spend = Proc.new { |current_company| current_company.plan.price }- # config.company.monthly_spend = Proc.new { |current_company| (current_company.plan.price - current_company.subscription.discount) }-- # == Custom Style- # By default, Intercom will add a button that opens the messenger to- # the page. If you'd like to use your own link to open the messenger,- # uncomment this line and clicks on any element with id 'Intercom' will- # open the messenger.- #- # config.inbox.style = :custom- #- # If you'd like to use your own link activator CSS selector- # uncomment this line and clicks on any element that matches the query will- # open the messenger- # config.inbox.custom_activator = '.intercom'- #- # If you'd like to hide default launcher button uncomment this line- # config.hide_default_launcher = true- #- # If you need to route your Messenger requests through a different endpoint than the default, uncomment the below line. Generally speaking, this is not needed.- # config.api_base = "https://api-iam.intercom.io"- #- end-enddiff --git a/config/initializers/version.rb b/config/initializers/version.rbindex 3aefc6bac7..0c24cd297f 100644--- a/config/initializers/version.rb+++ b/config/initializers/version.rb@@ -14,7 +14,7 @@ module Maybeprivatedef semver- "0.6.0"+ "0.6.1"endendend