Skip to content

Improvements to conversations with more than one participant#6094

Merged
microstudi merged 19 commits intodevelopfrom
feat/conversations_improvements
May 25, 2020
Merged

Improvements to conversations with more than one participant#6094
microstudi merged 19 commits intodevelopfrom
feat/conversations_improvements

Conversation

@Leusev
Copy link
Copy Markdown
Contributor

@Leusev Leusev commented May 13, 2020

🎩 What? Why?

Acording to #5861 (Conversations with more than one person) issue, there's some improvements to be done.

This PR improves:

  • There are some aria roles missing from my previous example that could be useful in this case, like aria-owns (that links the input to the autocompleting options), aria-expanded (that tells the user when a control is expanded or not) or role="option" to indicate that somehing is an option in the expanded menu.
  • It looks like you can select the same user several times, shouldn't the selected ones be removed from the autocomplete list?

📌 Related Issues

Notes

As in order to add aria accessibility funcionality for users dropdown auto-generated by Tribute.js lib, I had temporoliy modified tribute.js file as a inmediate fix while in the other hand I opened a PR to Tribute github repo with the same change:

  • Add some aria attribute to dropdown for accessibility purposes #469

📋 Subtasks

  • Add CHANGELOG entry
  • If there's a new public field, add it to GraphQL API
  • Add documentation regarding the feature
  • Add/modify seeds
  • Add tests

📷 Screenshots

image

@Leusev Leusev linked an issue May 13, 2020 that may be closed by this pull request
@Leusev Leusev marked this pull request as ready for review May 14, 2020 12:10
@Leusev Leusev requested review from jesusdb and tramuntanal May 14, 2020 12:10
@tramuntanal
Copy link
Copy Markdown
Contributor

Hi @decidim/product this has been deployed into our staging

@Leusev Leusev requested a review from microstudi May 19, 2020 13:23
Copy link
Copy Markdown
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

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

Good job,
we just need to improve a little bit the GraphQL API additions. Please check the comments regarding the file user_entify_input_filter.rb.

A part from that comments, I'd like to modify the description in that file so it generates a more detailed documentation in /api/docs:

Proposed changes in user_entity_input_filter.rb:
imatge

Check http://localhost:3000/api/docs#UserEntityFilter to look for the generated result.

op_name.or(op_nick)
end
end
argument :exclusion,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
argument :exclusion,
argument :exclude_ids,

I'd change this for its imperative form, and being more specific about what's been used to exclude

end
argument :exclusion,
type: String,
description: "Excludes users contained in given ids",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: "Excludes users contained in given ids",
description: "Excludes users contained in given ids. Valid values are one or more IDs (passed as an arrays)",

This is used in the documentation, so let's try to be as clear as possible

end
end
argument :exclusion,
type: String,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
type: String,
type: [ID],

As we are using ID, we can specify array types of ID, this allows us to use a more idiomatic Graphql call:

users(filter:{excludeIds: [2 10 11]}) {

or simply:

users(filter:{excludeIds: 2}) {

required: false,
prepare: ->(value, _ctx) do
proc do |model_class|
value = value.split(",")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
value = value.split(",")

We can remove this if using array type declaration

@Leusev
Copy link
Copy Markdown
Contributor Author

Leusev commented May 22, 2020

It should be ok now @microstudi 😄

@Leusev Leusev requested a review from microstudi May 22, 2020 09:41
Copy link
Copy Markdown
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

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

There's only a correction on the camel case example calling the GraphQL


```
{
users(filter:{wildcard:\"sandy\", exclude_ids:[2,10,11]}) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
users(filter:{wildcard:\"sandy\", exclude_ids:[2,10,11]}) {
users(filter:{wildcard:\"sandy\", excludeIds:[2,10,11]}) {

@Leusev
Copy link
Copy Markdown
Contributor Author

Leusev commented May 25, 2020

It should be ok now @microstudi 😄

microstudi
microstudi previously approved these changes May 25, 2020
@microstudi
Copy link
Copy Markdown
Contributor

Thanks!

microstudi
microstudi previously approved these changes May 25, 2020
@microstudi microstudi merged commit 95a4031 into develop May 25, 2020
@microstudi microstudi deleted the feat/conversations_improvements branch May 25, 2020 16:50
ace pushed a commit to aspgems/decidim that referenced this pull request May 27, 2020
* develop:
  Include year in meetings card (decidim#6102)
  Add attachment enabled option to initiative types and initiatives (decidim#6036)
  Fix a flaky test in group profile conversations (decidim#6123)
  Add attachments to Initiatives (decidim#5844)
  Add initiatives export (decidim#6070)
  Improvements to conversations with more than one participant (decidim#6094)
  Elections module and election administration (decidim#6065)
  Separate forms in steps (decidim#6108)
  Add sorting by publishing date to initiatives (decidim#6016)
  Improve proposal preview: Use proposal card when previewing a proposal draft (decidim#6064)
  Newsletter templates fixes (decidim#6096)

# Conflicts:
#	decidim-initiatives/app/models/decidim/initiative.rb
#	decidim-initiatives/spec/system/admin/initiative_types_controller_spec.rb
ace pushed a commit to aspgems/decidim that referenced this pull request May 28, 2020
* feature/add_areas_to_initiatives: (30 commits)
  Adds areas to FO filters
  Fix lint issue
  Fixes rubocop issues
  Updates changelog
  Adds areas to initiatives
  Send notification when signature threshold reached (decidim#6098)
  Adds filter by initiative type to admin panel (decidim#6093)
  Require confirmation on exiting a survey mid-answering (decidim#6118)
  Information message when there isn't any Proposal (decidim#6063)
  Set email asset host dynamically (decidim#5888)
  Harmonizes the design of initiatives search in FO (decidim#6090)
  Include year in meetings card (decidim#6102)
  Add attachment enabled option to initiative types and initiatives (decidim#6036)
  Fix a flaky test in group profile conversations (decidim#6123)
  Add attachments to Initiatives (decidim#5844)
  Add initiatives export (decidim#6070)
  Improvements to conversations with more than one participant (decidim#6094)
  Elections module and election administration (decidim#6065)
  Separate forms in steps (decidim#6108)
  Add sorting by publishing date to initiatives (decidim#6016)
  ...

# Conflicts:
#	decidim-initiatives/app/cells/decidim/initiatives/initiative_m_cell.rb
#	decidim-initiatives/app/commands/decidim/initiatives/admin/update_initiative.rb
#	decidim-initiatives/app/controllers/decidim/initiatives/initiatives_controller.rb
#	decidim-initiatives/app/forms/decidim/initiatives/admin/initiative_form.rb
#	decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb
#	decidim-initiatives/app/models/decidim/initiative.rb
#	decidim-initiatives/app/services/decidim/initiatives/initiative_search.rb
#	decidim-initiatives/app/views/decidim/initiatives/create_initiative/fill_data.html.erb
#	decidim-initiatives/app/views/decidim/initiatives/initiatives/_filters.html.erb
#	decidim-initiatives/app/views/decidim/initiatives/initiatives/_tags.html.erb
#	decidim-initiatives/config/locales/en.yml
#	decidim-initiatives/db/migrate/20200514085422_add_area_to_initiatives.rb
#	decidim-initiatives/db/migrate/20200514102631_add_area_enabled_option_to_initiatives.rb
#	decidim-initiatives/spec/forms/initiative_form_spec.rb
#	decidim-initiatives/spec/services/decidim/initiatives/initiative_search_spec.rb
#	decidim-initiatives/spec/shared/update_initiative_type_example.rb
#	decidim-initiatives/spec/system/admin/admin_manages_initiatives_spec.rb
#	decidim-initiatives/spec/system/admin/initiative_types_controller_spec.rb
#	decidim-initiatives/spec/system/filter_initiatives_spec.rb
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.

Improvements to conversations with more than one participant

3 participants