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

Switch to use new bootstrap 5 non-jQuery API #2810

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Conversation

jrochkind
Copy link
Contributor

In Bootstrap 4, the JS API for interacting with tabs and collapsible elements was a jQuery plugin.

In Bootstrap 5, the jQuery plugin ought to still be supported if you have jQuery installed. But we're going to switch to the new straight-JS API here. This is a head start on likely future switch to not use jQuery, but the main reason we are doing it is in hopes that it will help with some of our super mysterious flakey JS that seems to be around code for showing tabs and collapsibles.

@jrochkind jrochkind marked this pull request as draft December 11, 2024 17:38
@jrochkind
Copy link
Contributor Author

jrochkind commented Dec 11, 2024

Definitely hasn't totally solved it, we just got one of the more common ones:

1) Oral history with audio display With OHMS synchronized transcript and ToC can display, and search, without errors
     Failure/Error: page.find(copy_to_clipboard).click

     Selenium::WebDriver::Error::ElementClickInterceptedError:
       element click intercepted: Element <button class="btn btn-outline-secondary" data-trigger="linkClipboardCopy">...</button> is not clickable at point (648, 213). Other element would receive the click: <div class="ohms-search-results">...</div>

     # ./spec/system/oral_history_with_audio_spec.rb:423:in `block (3 levels) in <main>'

And now we have a screenshot image....

failures_r_spec_example_groups_oral_history_with_audio_display_with_ohms_synchronized_transcript_and_to_c_can_display__and_search__without_errors_516

OK the was not scrolled far enough to actually put the "copy to clipboard" link on screen. Hmm.

@jrochkind
Copy link
Contributor Author

OK, you actually have to click "Share link" to open up the section with "copy to cliipboard".

Our capybara script didn't include that! And mostly worked anyway, because the OHMS Search code that opens up a ToC section with a result was sloppy, and could open up too much or the wrong thing.... still not sure why test was then flakey instead of always failing, but trying to make everything more precise.

@jrochkind jrochkind force-pushed the bootstrap_js_api_new branch 2 times, most recently from 323c5dd to ea7a56e Compare December 12, 2024 14:55
@jrochkind
Copy link
Contributor Author

OK I think this was not related to the problem and does not fix it, but as long as we're here we might as well make the change.

@jrochkind jrochkind marked this pull request as ready for review December 12, 2024 14:55
@eddierubeiz
Copy link
Contributor

Approved - merge as you see fit.

@jrochkind jrochkind marked this pull request as draft December 12, 2024 15:38
@jrochkind jrochkind force-pushed the bootstrap_js_api_new branch from 7e71408 to c48e96b Compare December 12, 2024 16:57
@jrochkind jrochkind marked this pull request as ready for review December 12, 2024 17:15
@jrochkind jrochkind merged commit 03e3204 into master Dec 12, 2024
1 check passed
@jrochkind jrochkind deleted the bootstrap_js_api_new branch December 12, 2024 17:15
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.

2 participants