GeorgeDuckett
经常贡献者

Anaplan更好的公式编辑器;新的铬/firefox/edge扩展

大家好,节日快乐!

I have made a Google Chrome and Firefox extension that enhances Anaplan formula editing by using the Monaco editor. This is the editor used by Anaplan's new modelling experience. My extension works with this new experience adding enhancements over and above what Anaplan have done. It also works with the current/old formula editing experience; it's best in the new experience though.

铬合金:https://chrome.google.com/webstore/detail/better-formula-editor-for/lonibgccfehnjjhchfcbdhkaajhobeak
Firefox:https://addons.mozilla.org/en-GB/firefox/addon/better-formula-editor-anaplan/
优势:https://microsoftedge.microsoft.com/addons/detail/better-formula-editor-for/dkeigmhhjolcnnanpachagca...
(一旦添加一定要重新加载任何开放anaplan选项卡s)

Details below:

  • 公式验证:对公式进行了各种检查,包括简单的事物,例如确保所有实体均正确命名 /引用,或确保在整个公式中使用正确的数据类型,诸如在引用不同的dimension missension nives nive tod tress fit limemens方面。
  • Hover Information: You can hover your mouse over most elements of a formula to get contextual information, for example hovering over line items shows their dimensions and data type and hovering over function names to get information about that function.
  • 代码完成:当您键入时,编辑器将为当前模块中的订单项,其他模块,功能名称等中的完全合格的订单项提供自动完成建议。
  • 功能信息:使用括号完成功能时,您将获得与功能参数有关的弹出上下文信息,以及对函数和参数的说明。

The extension is under active development; currently next on the list is intelligent autocomplete suggestions for lookups required when referencing line items with different dimensions. Something like suggesting "LOOKUP: PROP C10 ItemCustomer.P6 Item" when pressing "[" after a relevant line item.

Please let me know what you think; I'm very open to further ideas!

27 REPLIES27
GeorgeDuckett
经常贡献者

I've made some enhancements to this extension. It now supports code formatting, via the context menu (right-click) and via the standard Monaco editor shortcut (Shift-Alt-F). I know this one was requested a while back. I held off of doing this since I read somewhere that it was on Anaplan's road-map, but since it's been a while I figured I may as well add it in.

I've also improved handling of the Enter and Escape keys. Now, when code-completion is up and you press Enter it will accept the completion, rather than submitting any formula change to Anaplan. Escape now closes any open editor widgets (such as code completion or function information) rather than stopping editing the formula.

Chenjack.sonos
认证的桅杆er Anaplanner

谢谢@Georgeduckett呢我刚刚下载了它,看起来很棒 - 如果有的话,将分享反馈!

M.Kierepka
认证的桅杆er Anaplanner

Hi@Georgeduckett,

Wow, it's really good! Nice functionalities, extremely helpful, and at least for now I have not met any bugs.

Idea from me: Thanks to formula autocompletion and function information, it's fantastic when you don't remember order of arguments or how some function should be used. And in my opinion, all would benefit even more if you could add:

  • “Be cautious” — warning, maybe in form of underline (not red, but yellow/orange), for functions like TEXTLIST, RANK, SELECT:, FINDITEM, to warn users that function like this can cause performance or maintenance problems.
  • “更多信息” - 就像您具有指向Anapedia页面的链接以用于突出显示功能一样,也许您可​​以为此添加一些链接?(TBH,Anaplan应将此类链接添加到Anapledia中,以供某些功能:Select:或TextList…)

另外,当您发布了Chrome的扩展时,它应该可以在任何使用Blink Browser Engine的浏览器上工作并可以安装(因此不仅是Google Chrome,还包括Microsoft Edge,Vivaldi和Opera)。但是,我正在使用使用不同引擎的Mozilla Firefox,但是您的扩展名仍然可以在那里工作,尽管目前无法安装它,因为它不在官方的Mozilla Firefox Addons Store中。因此,我将开发人员模式用于您的插件,并试图对其进行调整,因此它可以在Firefox下工作,并且……可以使用。因此,如果您也可以正式发布firefox的插件,那么我会非常高兴随时更改/更新它):

{“ browser_specific_settings”:{“ gecko”:{“ id”:“ georgeduckett@anaplan.com”,“ strict_min_version”:“ 90.0”}},“ content_scripts”,“ content_scripts”“/dist/content-script.js”],“匹配”:[https://gapp.anaplan.com/gom/'],“ run_at”:“ document_end”}],“描述”:扩展以多种方式增强Anaplan公式编辑;提供代码完成,悬停信息和有效性检查。更好的公式编辑器,“ Anaplan”,“版本”:“ 1.1.0”,“ web_accessible_resources”:[“ dist/*”亚搏娱乐电子]}

GeorgeDuckett
经常贡献者

Hi@m.kierepka,

感谢您的兴趣;很高兴您发现它非常有用!

Those are all really interesting ideas and something I could potentially look to add if there's enough interest. I'm not 100% sure if I want to add warnings for things that are valid (but possibly should be avoided) when I don't have an easy way to ignore them. I want to avoid my extension having options, although I'm not opposed to the idea, but even if I added an option to ignore/hide warnings that still might not help though, as there wouldn't be a way of ignoring one warning without ignoring all of them.

回覆。the idea about linking to the Planual is good, but would be fairly timeconsuming. Currently to get information about Anaplan functions I'm parsing their documentation automatically since most pages are a consistent format, but for the Planual that isn't the case. Also, most of the topics don't directly relate to a single formula syntax or function; they're general advice so I'm not too sure where any links or text would appear.

回覆。我正在为此正在努力的Firefox扩展名,但它并不像我希望的那样简单。发布插件时,包括任何一个JavaScript文件的大小都有限制。最终,我已经解决了这个问题,但是不得不放弃对旧/当前建模UI的支持,因为那意味着我必须为摩纳哥编辑器提供代码,这太大了。这意味着我不得不将构建过程分开以为Chrome和Firefox创建单独的软件包。对于Firefox,您还必须提交源代码和说明以运行构建,因此我必须确保在那里也有清晰的说明。不过,它肯定在清单上,我希望在本周末能有所作为。

GeorgeDuckett
经常贡献者

@m.kierepka我为Firefox Addin Store创建了一个扩展名的版本,因此您应该能够使用该版本。尽管我仍然推荐新的限制,但我也能够最终能够对旧建模体验保持支持。我还为Edge添加了一个特定于Edge的版本。

The firefox addon page is here:https://addons.mozilla.org/en-GB/firefox/addon/better-formula-editor-anaplan/

M.Kierepka
认证的桅杆er Anaplanner

Wow, I really appreciate all the work you have done! I downloaded it from Mozilla's page, tested briefly, works like charm:thumbs_up:
我认为越来越多的Anaplanners使用新的建模经验(包括我自己),但仍然感谢您支持旧的建模经验。
GeorgeDuckett
经常贡献者

没问题。这是一个有趣的小侧项目!是的,我认为新体验比旧体验要好得多。关于各种零件的学习是一个有趣的小挑战,可以使Firefox Addin也与旧的人一起使用。

Misbah
Moderator

@m.kierepka@Georgeduckett@chenjack.sonos

Does it work on Mac as well? I just added this extension to the chrome and it didn't change anything

GeorgeDuckett
经常贡献者

@MisbahThat's interesting. I don't have a mac to test with, but my understanding is chrome extensions should work the same regardless of operating system. Did you try it in the new modelling experience? Note that visually it won't change anything until you start to edit a formula, at which point it should do the things detailed in the YouTube video; auto complete line items / modules / function names etc.