HUE-9066 [gist] Port functionality to Editor 2

Review Request #14468 — Created Nov. 11, 2019 and submitted

romain
hue
master
HUE-9066
hue
jgauthier, johan, ranade, romain, weixia, yingc
commit a70654e4dc10d3ae78591ffad7b8a4ec98fa2c45
Author: Romain <romain.rigaux@gmail.com>
Date:   Mon Nov 11 01:50:24 2019 -0800

    HUE-9066 [gist] Port functionality to Editor 2

:100644 100644 462c8382e3 bc88ccde59 M	desktop/core/src/desktop/js/api/apiHelper.js
:100644 100644 52bc68522a 6c101b3270 M	desktop/core/src/desktop/js/apps/notebook2/components/ko.snippetEditorActions.js
:100644 100644 1b65f93a1b 91e87e25a3 M	desktop/core/src/desktop/js/apps/notebook2/editorViewModel.js

Any specific place where adding a js test would make sense?

  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
johan
  1. Nice!

  2. resolve(response.link) to not spread the status outside apiHelper. (it'll reject on bad status)

  3. This part is handled in apiHelper.simplePost (status !== 0 etc.). For specific error handling it'll reject the promise from createGistAsync.

    Handle if needed with:

    try {
    const gist = await apiHelper.createGistAsync...
    } catch (banana) {
    banana...
    }

  4. 
      
romain
  1. Thanks for the infos!

  2. 
      
romain
Review request changed

Status: Closed (submitted)

Loading...