weixin_39984578
weixin_39984578
2020-12-30 15:21

Elyra launcher

Use our own Launcher implementation to properly order Elyra category/section and display project logo

Todos: - [x] Make this the default Launcher when Elyra is installed - [x] Change the Elyra section logo to be project logo

image

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

该提问来源于开源项目:elyra-ai/elyra

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

13条回答

  • weixin_39962199 weixin_39962199 4月前

    Also if you want help with understanding how the code in your second link handle all three cases (really deprecated icon as a string, recently deprecated iconClass, and new icon as a LabIcon) then I can hope on a 5min call tomorrow to explain it (it took me some time to wrap my head around what those few line were actually accomplishing.

    点赞 评论 复制链接分享
  • weixin_39546092 weixin_39546092 4月前

    thanks for the clarification

    点赞 评论 复制链接分享
  • weixin_39984578 weixin_39984578 4月前

    I guess we are in consensus here. Note that there is still a need to make this area a little more flexible on core and I will follow up with that later on.

    点赞 评论 复制链接分享
  • weixin_39984578 weixin_39984578 4月前

    Below is how this looks like without console, which indeed makes it much more clean, but I don't feel confortable removing it unless the user can somehow re-enable it.

    image

    点赞 评论 复制链接分享
  • weixin_39546092 weixin_39546092 4月前

    Below is how this looks like without console, which indeed makes it much more clean, but I don't feel confortable removing it unless the user can somehow re-enable it.

    i wouldn't recommend removing Console but rather just placing it lower in the order (below Elrya).

    点赞 评论 复制链接分享
  • weixin_39984578 weixin_39984578 4月前

    After some discussion, looks like it's better just to move the Elyra section above Others and leave everything else as is.

    点赞 评论 复制链接分享
  • weixin_39962199 weixin_39962199 4月前

    I replaced your fix for the elyra icon with another solution I figured out. iconClass support was deprecated in Lab 2.0 and is set to be removed as soon as 3.0 so I would prefer we don't rely on it. As such I did some digging into react and figured out a way to replace the LabIcon itself.

    点赞 评论 复制链接分享
  • weixin_39984578 weixin_39984578 4月前

    We should also revisit the launcher interface on the lab side to make it more extensible I guess.

    点赞 评论 复制链接分享
  • weixin_39546092 weixin_39546092 4月前

    I replaced your fix for the elyra icon with another solution I figured out. iconClass support was deprecated in Lab 2.0 and is set to be removed as soon as 3.0 so I would prefer we don't rely on it. As such I did some digging into react and figured out a way to replace the LabIcon itself.

    unless i am misunderstanding, it is icon that is being deprecated in favor of iconClass or at least that's how i interpreted these comments:

    https://github.com/jupyterlab/lumino/blob/master/packages/commands/src/index.ts#L194,L229

    https://github.com/jupyterlab/jupyterlab/blob/master/packages/launcher/src/index.tsx#L199,L203

    are those comments incorrect? is iconClass (not icon) what is actually being deprecated? if so, i guess i can go along with the approach.

    点赞 评论 复制链接分享
  • weixin_39962199 weixin_39962199 4月前

    Ah I see where you're confused.

    icon has a messy history. A while back (before I started working with jupyter) icon was deprecated in favor of iconClass which behaved the same way, being a css class string, but was clearer in its actual meaning.

    But then when LabIcon was implemented for Lab 2.0 the deprecated icon was overloaded with the new functionality. So what's deprecated is the ability to set icon to a string, which would just be aliased to iconClass. The new functionality is that icon can also be a LabIcon (which extends VirtualElement.IRenderer). This way of handling icons is the new standard. You can learn more about LabIcon here: https://github.com/jupyterlab/jupyterlab/blob/5555c77a17d48b973c66cb32141844f2ce34e10f/packages/ui-components/CONTRIBUTING.md

    点赞 评论 复制链接分享
  • weixin_39984578 weixin_39984578 4月前

    would it be worth adding a Code Snippet card to the Elyra category, which would launch the Add new code-snippet form?

    Not a bad idea, as long as the extension creates it, it will show up properly here on the launcher.

    点赞 评论 复制链接分享
  • weixin_39984578 weixin_39984578 4月前

    This seems to be working now, it would be nice to have the icon on Elyra section changed to the actual Elyra icon instead of the Pipeline editor one.

    点赞 评论 复制链接分享
  • weixin_39546092 weixin_39546092 4月前

    would it be worth adding a Code Snippet card to the Elyra category, which would launch the Add new code-snippet form?

    点赞 评论 复制链接分享

相关推荐