-
Notifications
You must be signed in to change notification settings - Fork 1
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
Task/change to jsbundling 931 #933
Conversation
…om/NUARIG/competitions into feature/clean-refactor-banners-881 # Conflicts: # app/views/grant_reviewers/index.html.haml
# Conflicts: # app/assets/stylesheets/app.scss
# Conflicts: # Gemfile.lock # app/views/devise/sessions/_form.html.erb # app/views/layouts/application.html.haml # db/schema.rb
import { Controller } from "@hotwired/stimulus" | ||
|
||
export default class extends Controller { | ||
connect() { | ||
this.element.textContent = "Hello World!" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need this file.
app/javascript/controllers/index.js
Outdated
import HelloController from "./hello_controller.js" | ||
application.register("hello", HelloController) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need these.
app/models/banner.rb
Outdated
|
||
# TURBO BANNER WORK | ||
# has_paper_trail versions: { class_name: 'PaperTrail::BannerVersion' } | ||
|
||
# scope :visible, -> { where(visible: true) } | ||
# scope :invisible, -> { where(visible: false) } | ||
# scope :by_created_at, -> { order(created_at: :desc) } | ||
|
||
# validates_presence_of :body | ||
|
||
# # broadcasts_to ->(banner) { :banners }, inserts_by: :prepend | ||
|
||
# # after_create_commit { broadcast_prehttps://blog.cloud66.com/content/images/size/w1000/2021/02/making-hotwire-and-devise-play-nicely.pngpend_to "banners" } | ||
# # after_update_commit { broadcast_replace_to "banners" } | ||
# # after_destroy_commit { broadcast_remove_to "banners" } | ||
|
||
# after_create_commit :create_banner_view | ||
|
||
# after_update_commit :update_banner_view | ||
# after_destroy_commit :destroy_banner_view | ||
|
||
# private | ||
# def create_banner_view | ||
# broadcast_prepend_to "banners" | ||
# # broadcast_replace_to "new_banner_form", partial: 'banners/banner_form', banner: Banner.new | ||
# # broadcast_replace_to "format_flash_messages" | ||
|
||
# end | ||
|
||
# def update_banner_view | ||
# broadcast_replace_to "banners" | ||
# end | ||
|
||
# def destroy_banner_view | ||
# broadcast_remove_to "banners" | ||
# end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stash this if you need it later, otherwise, remove it.
// $(document).on('nested:fieldRemoved', function(event) { | ||
// console.log("I AM IN THIS JS FUNCTION.") | ||
// confirm('Please submit the form to confirm your changes.'); | ||
// }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
@@ -1,8 +1,8 @@ | |||
%fieldset.fieldset.form_builder_question_fieldset | |||
%fieldset.fieldset.form_builder_question_fieldset{id: "question-fieldset"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may not what you want here. multiple question_fieldset
will all have the same id
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
Unassigned Submissions | ||
Reviewers and Submissions | ||
%p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still not convinced changes to this file should be in the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment.
Incorporates changes for jsbundling from banners work into develop without switching banners to work with turbo.
closes #931