Skip to content
Snippets Groups Projects

fix(plugin): onSearch listener when clicking on reaction (MIN-314)

1 unresolved thread

When clicking on a reaction onSearch listener is called for a plugin. To the data provided to the listener callback argument added data about reaction itself in addition to bioEntities connected to reaction.

reaction-fix-plugin

Closes MIN-314

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
56 56 )
57 57 ).unwrap().then((bioEntityContents) => {
58 58 PluginsEventBus.dispatchEvent('onSearch', {
59 type: 'bioEntity',
59 type: 'reaction',
60 60 searchValues: [closestSearchResult],
61 results: [bioEntityContents],
61 results: [[...bioEntityContents, reaction]],
  • There's array inside an array. Is that intentional? If yes, why it's implemented like that?

  • Each array in results inside array corresponds to each individual searchValues. 1 element in searchValues ​​corresponds to the first arrary in results. This is the schema agreed with Piotr: link This is solved this way because when searching with input in TopBar, e.g. with the phrase NR4A2;SNCA;aspirin;morphine, we have several elements in the results and the data returned for each individual element of the phrase is thrown into a separate array. For example, for NR4A2 it will be the first array in results

  • Please register or sign in to reply
  • Overall LGTM

    Please fix array issue if that's unintentional

  • Adrian Orłów approved this merge request

    approved this merge request

  • added 11 commits

    Compare with previous version

  • mentioned in commit 9def2152

  • Please register or sign in to reply
    Loading