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 Unique Toolbar Button IDs #8995

Merged
merged 3 commits into from
Jan 12, 2021

Conversation

noi5e
Copy link
Contributor

@noi5e noi5e commented Jan 12, 2021

Partial fix for #8478

I think this will be relatively simple to review 🤞

Adding unique IDs and common classes to the toolbar buttons used in comment forms.

My eventual goal is to assign click eventHandlers to each button. Having unique IDs will ensure that e.target will be accurate, as we've seen with bug fixes for image upload cross-wiring.


(This issue is part of the larger Comment Editor Overhaul Project with Outreachy. Refer to Planning Issue #9069 for more context)

@noi5e noi5e requested a review from a team as a code owner January 12, 2021 05:21
@gitpod-io
Copy link

gitpod-io bot commented Jan 12, 2021

app/helpers/application_helper.rb Outdated Show resolved Hide resolved
app/helpers/application_helper.rb Outdated Show resolved Hide resolved
app/helpers/application_helper.rb Outdated Show resolved Hide resolved
app/helpers/application_helper.rb Outdated Show resolved Hide resolved
app/helpers/application_helper.rb Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 12, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@f43f615). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8995   +/-   ##
=======================================
  Coverage        ?   82.05%           
=======================================
  Files           ?      100           
  Lines           ?     5962           
  Branches        ?        0           
=======================================
  Hits            ?     4892           
  Misses          ?     1070           
  Partials        ?        0           

@codeclimate
Copy link

codeclimate bot commented Jan 12, 2021

Code Climate has analyzed commit 7871ee7 and detected 0 issues on this pull request.

View more on Code Climate.

@@ -77,6 +77,20 @@ def get_large_dropzone_id(location, reply_to)
end
end

# used in views/editor/_toolbar.html.erb
Copy link
Member

Choose a reason for hiding this comment

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

thanks for the comment here, these can be tough to trace! There is the ability to make view-specific helpers like editor_helper.rb but often if they only contain a few lines, it can make them harder to find!

</div>

<div class="btn-group">
<a aria-label="Help" data-toggle="tooltip" title="Help" data-placement="bottom" class="btn btn-outline-secondary btn-sm" target="_blank" href="/wiki/authoring-help"><i class="fa fa-question-circle" ></i></a>
<a
id="help-button-<%= toolbar_element_id %>"
Copy link
Member

Choose a reason for hiding this comment

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

appreciate the formatting work here. Thanks!

@jywarren jywarren merged commit e885e71 into publiclab:main Jan 12, 2021
@jywarren
Copy link
Member

Awesome, thanks!!!

@noi5e noi5e deleted the feature/add-toolbar-button-IDs branch January 12, 2021 18:55
@noi5e noi5e added feature explains that the issue is to add a new feature outreachy labels Jan 13, 2021
@noi5e noi5e changed the title Feature: Add Unique Toolbar Button IDs Add Unique Toolbar Button IDs Jan 23, 2021
manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
* add logic for editor/toolbar partial publiclab#8478

* add unique toolbar button IDs publiclab#8478

* remove trailing whitespaces
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
* add logic for editor/toolbar partial publiclab#8478

* add unique toolbar button IDs publiclab#8478

* remove trailing whitespaces
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
* add logic for editor/toolbar partial publiclab#8478

* add unique toolbar button IDs publiclab#8478

* remove trailing whitespaces
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
* add logic for editor/toolbar partial publiclab#8478

* add unique toolbar button IDs publiclab#8478

* remove trailing whitespaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature explains that the issue is to add a new feature outreachy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants