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

Task/change to jsbundling 931 #933

Merged
merged 27 commits into from
Apr 28, 2022
Merged

Conversation

mattbaumann1
Copy link
Collaborator

Incorporates changes for jsbundling from banners work into develop without switching banners to work with turbo.

closes #931

mattbaumann1 and others added 25 commits November 4, 2021 15:59
…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
@mattbaumann1 mattbaumann1 requested a review from jseraf April 25, 2022 15:52
@mattbaumann1 mattbaumann1 self-assigned this Apr 25, 2022
Comment on lines 1 to 7
import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
connect() {
this.element.textContent = "Hello World!"
}
}
Copy link
Collaborator

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.

Comment on lines 6 to 7
import HelloController from "./hello_controller.js"
application.register("hello", HelloController)
Copy link
Collaborator

Choose a reason for hiding this comment

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

don't need these.

Comment on lines 9 to 44

# 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
Copy link
Collaborator

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.

Comment on lines +28 to +31
// $(document).on('nested:fieldRemoved', function(event) {
// console.log("I AM IN THIS JS FUNCTION.")
// confirm('Please submit the form to confirm your changes.');
// });
Copy link
Collaborator

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"}
Copy link
Collaborator

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.

Copy link
Collaborator

@jseraf jseraf left a comment

Choose a reason for hiding this comment

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

see comments

Comment on lines 41 to 42
Unassigned Submissions
Reviewers and Submissions
%p
Copy link
Collaborator

@jseraf jseraf Apr 27, 2022

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

Copy link
Collaborator

@jseraf jseraf left a comment

Choose a reason for hiding this comment

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

See comment.

@mattbaumann1 mattbaumann1 merged commit c8da9b1 into develop Apr 28, 2022
@mattbaumann1 mattbaumann1 deleted the task/change-to-jsbundling-931 branch April 28, 2022 19:57
@mattbaumann1 mattbaumann1 mentioned this pull request Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorporate JS changes from Banner efforts
2 participants