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

WIP: Hide unneeded "Attach Files" button when creating a new FAQ question - Resolves #5070 #5078

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

emmet0r
Copy link

@emmet0r emmet0r commented Mar 7, 2025

Resolves #5070

Description

An unneeded "Attach Files" button was appearing on the form to create a new FAQ when logged in as an administrator, as described in #5070.

Digging in the code (and some maintainer help!) revealed that the relevant row of buttons is a Trix toolbar. The only way we could figure out how to hide the button was to do it via the CSS. However, after adding and testing the button-hiding code in actiontext.scss, we found that the changes weren't showing live. (It's not clear actiontext.scss is actually getting used anywhere?)

Importing actiontext.scss into application.scss fixed this... but maybe someone with better knowledge of the codebase can suggest a cleaner approach?

Big thanks to Albert and Rachel at the SCaLE workshop, who both sat and dug around in the code with me to find a solution 💫

This Medium article was also a helpful reference.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  1. Sign in as [email protected]
  2. Click on FAQ
  3. Click on Write New Question and Answer
  4. You should no longer see a button labeled "Attach Files" in the row of buttons below the input field

Screenshots

image

"Attach Files" button is no longer visible in the list of toolbar buttons below the input field.

@dorner
Copy link
Collaborator

dorner commented Mar 7, 2025

@emmet0r this is marked as WIP - does it need any further work?

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.

FAQ has capability to attach a file, but not ability to read it. Remove the capability.
2 participants