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

Comment functionality on shared and synchronized collections #699 #1237

Merged
merged 63 commits into from
Jun 27, 2023

Conversation

TasnimMehzabin
Copy link
Contributor

@TasnimMehzabin TasnimMehzabin commented Mar 24, 2023

Closes #563

@TasnimMehzabin TasnimMehzabin changed the base branch from main to 498-inbox-font-fixes March 24, 2023 11:15
@TasnimMehzabin TasnimMehzabin changed the base branch from 498-inbox-font-fixes to main March 24, 2023 11:15
@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch from 8bd958b to 53218e9 Compare March 24, 2023 13:28
app/api/chemotion/collection_api.rb Show resolved Hide resolved
app/api/chemotion/collection_api.rb Show resolved Hide resolved
app/api/chemotion/collection_api.rb Show resolved Hide resolved
app/api/chemotion/collection_api.rb Show resolved Hide resolved
app/api/chemotion/collection_api.rb Show resolved Hide resolved
app/api/chemotion/screen_api.rb Outdated Show resolved Hide resolved
app/api/helpers/comment_helpers.rb Show resolved Hide resolved
app/api/helpers/comment_helpers.rb Outdated Show resolved Hide resolved
app/api/helpers/comment_helpers.rb Outdated Show resolved Hide resolved
app/models/collection.rb Outdated Show resolved Hide resolved
@TasnimMehzabin TasnimMehzabin marked this pull request as draft March 24, 2023 20:27
@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch from 53218e9 to 3250e1c Compare March 27, 2023 17:07
@TasnimMehzabin TasnimMehzabin marked this pull request as ready for review March 27, 2023 17:08
app/models/collection.rb Outdated Show resolved Hide resolved
app/models/comment.rb Outdated Show resolved Hide resolved
app/models/comment.rb Outdated Show resolved Hide resolved
app/models/comment.rb Outdated Show resolved Hide resolved
app/models/comment.rb Outdated Show resolved Hide resolved
spec/api/comment_api_spec.rb Outdated Show resolved Hide resolved
end
end

context 'with reaction' do

Choose a reason for hiding this comment

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

RSpec/NestedGroups: Maximum example group nesting exceeded [4/3].

spec/api/comment_api_spec.rb Outdated Show resolved Hide resolved
spec/api/comment_api_spec.rb Outdated Show resolved Hide resolved
spec/api/comment_api_spec.rb Outdated Show resolved Hide resolved
spec/api/comment_api_spec.rb Outdated Show resolved Hide resolved
spec/api/comment_api_spec.rb Outdated Show resolved Hide resolved
end
end

context 'when user is authorized' do

Choose a reason for hiding this comment

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

RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [23/10]

spec/api/comment_api_spec.rb Outdated Show resolved Hide resolved
spec/api/comment_api_spec.rb Outdated Show resolved Hide resolved
spec/api/comment_api_spec.rb Outdated Show resolved Hide resolved
end
end

describe 'PUT /api/v1/comments/:id' do

Choose a reason for hiding this comment

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

RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [23/10]

end

describe 'PUT /api/v1/comments/:id' do
context 'with only content' do

Choose a reason for hiding this comment

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

RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [25/10]

end

describe 'PUT /api/v1/comments/:id' do
context 'with only content' do

Choose a reason for hiding this comment

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

RSpec/NestedGroups: Maximum example group nesting exceeded [4/3].

spec/api/comment_api_spec.rb Outdated Show resolved Hide resolved
@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch from 3b4d36c to 1aee79c Compare March 28, 2023 10:11
end
end

context 'when user is authorized' do

Choose a reason for hiding this comment

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

RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [15/10]

allow_any_instance_of(WardenAuthentication).to receive(:current_user).and_return(author_user)
end

describe 'GET /api/v1/comments/:id' do

Choose a reason for hiding this comment

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

RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/10]

end
end

describe 'POST /api/v1/comments/create' do

Choose a reason for hiding this comment

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

RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [15/10]

end

describe 'POST /api/v1/comments/create' do
context 'with content' do

Choose a reason for hiding this comment

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

RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/10]

end
end

context 'with sample' do

Choose a reason for hiding this comment

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

RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/10]

end
end

context 'with sample' do

Choose a reason for hiding this comment

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

RSpec/NestedGroups: Maximum example group nesting exceeded [4/3].

end
end

context 'with reaction' do

Choose a reason for hiding this comment

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

RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/10]

end
end

context 'with reaction' do

Choose a reason for hiding this comment

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

RSpec/NestedGroups: Maximum example group nesting exceeded [4/3].

end
end

describe 'DELETE /api/v1/comments/:id' do

Choose a reason for hiding this comment

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

RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/10]

spec/models/comment_spec.rb Outdated Show resolved Hide resolved
@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch 3 times, most recently from f78381f to 95fd46b Compare March 29, 2023 09:40
@PiTrem PiTrem marked this pull request as draft April 4, 2023 08:18
@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch from 95fd46b to 8e67d16 Compare April 4, 2023 21:28
@github-actions
Copy link

github-actions bot commented Apr 4, 2023

LCOV of commit 8e67d16 during Continuous Integration #791

Summary coverage rate:
  lines......: 60.0% (11872 of 19777 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@TasnimMehzabin TasnimMehzabin marked this pull request as ready for review April 5, 2023 14:38
@TasnimMehzabin TasnimMehzabin marked this pull request as draft April 5, 2023 14:38
@TasnimMehzabin TasnimMehzabin marked this pull request as ready for review April 6, 2023 08:25
@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch from 8e67d16 to 2a08311 Compare April 20, 2023 12:54
@github-actions
Copy link

LCOV of commit 2a08311 during Continuous Integration #872

Summary coverage rate:
  lines......: 60.1% (11873 of 19767 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@github-actions
Copy link

LCOV of commit 6e0f459 during Continuous Integration #914

Summary coverage rate:
  lines......: 60.4% (11935 of 19766 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch from 6e0f459 to 1c81d6b Compare May 3, 2023 08:56
@github-actions
Copy link

github-actions bot commented May 3, 2023

LCOV of commit 1c81d6b during Continuous Integration #937

Summary coverage rate:
  lines......: 60.4% (11932 of 19765 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch from 1c81d6b to 0909bd3 Compare May 17, 2023 11:02
@github-actions
Copy link

LCOV of commit 0909bd3 during Continuous Integration #977

Summary coverage rate:
  lines......: 60.4% (11950 of 19787 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch from 0909bd3 to 7cdf91e Compare May 31, 2023 08:11
spec/api/chemotion/comment_api_spec.rb Show resolved Hide resolved
spec/api/chemotion/comment_api_spec.rb Show resolved Hide resolved
spec/api/chemotion/comment_api_spec.rb Show resolved Hide resolved
spec/api/chemotion/comment_api_spec.rb Show resolved Hide resolved
spec/api/chemotion/comment_api_spec.rb Show resolved Hide resolved
spec/api/chemotion/comment_api_spec.rb Show resolved Hide resolved
spec/api/chemotion/comment_api_spec.rb Show resolved Hide resolved
spec/api/chemotion/comment_api_spec.rb Show resolved Hide resolved
spec/api/chemotion/comment_api_spec.rb Show resolved Hide resolved
spec/api/chemotion/comment_api_spec.rb Show resolved Hide resolved
… lists

- Comments are associated with Wellplate, Screen, Research plan
- Code is refactored
…earchPlan

- Comment section is added in standard tabs in Reaction, Screen, Wellplate, ResearchPlan
- Code is modified to make generic
- Code is refactored
- Comment section name is generalized
- Comment section is hidden if element is being created
- From general comments, user can see all other details comment
- From section specific comments, user can see all other details comment
- Code is refactored
- Deploy file change is reverted
refactor folder structure for Comments components
…fic users only

add comment matrice
show the comment icon, comment header button based on the UI activation upon matrix check
remove unnecessary code
refactor the code
add test code for synchronized collections
- it will notify all users with access to the element
- it will notify all group members when the group has access to the element
reload the comments when the header comment button or the comment button within the details tabs are clicked
fix the notification to display the element type and element name
refactor the implementation of the notification to fix the collection owner not getting the notification on new comments
reposition the comment button in the header section
cleanup the schema.rb
@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch from 30c92f4 to 05ea853 Compare June 23, 2023 15:56
@TasnimMehzabin TasnimMehzabin marked this pull request as ready for review June 23, 2023 17:03
fix the comment_api_spec.rb file for the updated create API endpoint
fix the association issue
@TasnimMehzabin TasnimMehzabin force-pushed the 563-comment-on-shared-synced-collection branch from 05ea853 to 1804971 Compare June 26, 2023 05:31
FactoryBot.define do
factory :comment do
transient do
user { create(:user) }

Choose a reason for hiding this comment

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

FactoryBot/FactoryAssociationWithStrategy: Use an implicit, explicit or inline definition instead of hard coding a strategy for setting association within factory.

@github-actions
Copy link

LCOV of commit 7389cfe during Continuous Integration #1176

Summary coverage rate:
  lines......: 60.9% (12477 of 20485 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@PiTrem PiTrem merged commit 5bf60a1 into main Jun 27, 2023
2 of 3 checks passed
mekkyz pushed a commit that referenced this pull request Sep 21, 2023
)

* Comment polymorphic model

* associated to Sample Reaction RP screeen Wellplate

* Notification to users
baolanlequang pushed a commit that referenced this pull request Mar 5, 2024
)

* Comment polymorphic model

* associated to Sample Reaction RP screeen Wellplate

* Notification to users
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.

supervisor comment function
3 participants