Fix and modernize Asana integration.

Review Request #13991 — Created June 20, 2024 and submitted

Information

rbintegrations
release-4.x

Reviewers

Our Asana integration was broken because they completely rewrote their
Python API. This change fixes that up, and modernizes things a bit.
Here's the full scope of changes:

  • Pin the asana dependency version so this doesn't happen again.
  • Update our API calls for the new version.
  • Updated Python and JS code to add type hints and use spina where
    appropriate.
  • Updated the CSS to support dark mode for the field contents (when not
    in edit mode).
  • Overrode some CSS for the selectize field while editing to allow the
    contents to fill the available space, and wrap items within the field
    rather than showing everything in a single line.
  • Tweaked some of the sizes and spacing for task items to look nicer.

Once we end up creating our own autocomplete controls, I'd really like
to ditch selectize. For now, this is a big improvement on what we had.

  • Ran setup.py develop
  • Added an Asana integration. Verified that putting in a correct
    personal access token loaded the workspaces, and that an incorrect one
    showed an error.
  • Tested searching for and adding tasks.
  • Tested removing tasks.
  • Tested that wrapping worked correctly within the selectize field, and
    that moving the cursor and editing within the wrapped field worked
    correctly.
  • Verified the appearance in both light and dark modes.
Summary ID
Fix and modernize Asana integration.
Our Asana integration was broken because they completely rewrote their Python API. This change fixes that up, and modernizes things a bit. Here's the full scope of changes: - Pin the asana dependency version so this doesn't happen again. - Update our API calls for the new version. - Updated Python and JS code to add type hints and use spina where appropriate. - Updated the CSS to support dark mode for the field contents (when not in edit mode). - Overrode some CSS for the selectize field while editing to allow the contents to fill the available space, and wrap items within the field rather than showing everything in a single line. - Tweaked some of the sizes and spacing for task items to look nicer. Once we end up creating our own autocomplete controls, I'd really like to ditch selectize. For now, this is a big improvement on what we had. Testing Done: - Ran setup.py develop - Added an Asana integration. Verified that putting in a correct personal access token loaded the workspaces, and that an incorrect one showed an error. - Tested searching for and adding tasks. - Tested removing tasks. - Tested that wrapping worked correctly within the selectize field, and that moving the cursor and editing within the wrapped field worked correctly. - Verified the appearance in both light and dark modes.
5760899ec3a668d796952958387dbcb3701a3f56

Description From Last Updated

I wonder if we should link to a URL like https://developers.asana.com/docs/personal-access-token instead of listing out the steps here. If the …

maubinmaubin

Missing a closing " after tokens.

maubinmaubin

Should we wrap this in gettext?

maubinmaubin

Should we wrap this in gettext?

maubinmaubin
david
maubin
  1. 
      
  2. rbintegrations/asana/forms.py (Diff revision 1)
     
     
     
     
     
     
     
    Show all issues

    I wonder if we should link to a URL like https://developers.asana.com/docs/personal-access-token instead of listing out the steps here. If the steps change then our instructions will be out of date. But, there's also the risk of the link being unstable.

  3. rbintegrations/asana/forms.py (Diff revision 1)
     
     
     
    Show all issues

    Missing a closing " after tokens.

  4. Show all issues

    Should we wrap this in gettext?

  5. Show all issues

    Should we wrap this in gettext?

  6. 
      
david
maubin
  1. Ship It!
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.x (56a0e70)