Coder Social home page Coder Social logo

Arrow Meta Text about arrow-meta HOT 10 OPEN

arrow-kt avatar arrow-kt commented on May 20, 2024
Arrow Meta Text

from arrow-meta.

Comments (10)

i-walker avatar i-walker commented on May 20, 2024 1

One proposal is to add a costume QuickDocumentProvider, where we can display the text. I'll link a small PR down below, on how it may look like.

This may clash with the existing KotlinQuickDocumentProvider, that does the same job you see down below for Kotlin. We would need to suppress it for special KtElements, but I haven't find API's who do that.

one example

If we solely care about the Text we would add it as a KDoc on the descriptor and facilitate the existing Kotlin implementation.
Bare with me I am adding more suggestions as I discover them.
Screenshot 2019-11-20 at 16 30 37

from arrow-meta.

i-walker avatar i-walker commented on May 20, 2024 1

Another way to present Text using Side Panels like the one we see with Kotlin Bytcode
This is feature is a composition of AnActionand a ToolWindow.

Here Kotlin Bytecode is triggered through the Tools Panel and opens a Toolwindow on the left side.
Screenshot 2019-11-21 at 15 15 23

Screenshot 2019-11-21 at 14 56 39

it allows us to focus on the Content and how it is displayed rather than to create separate UI elements on top of Idea.

The advantage here is that we can move this Action to different places, e.g.: wrap it into a LineMarker and whenever a user clicks on it, it triggers the action. Toolwindows can be persistent as we see with Gradle.

Screenshot 2019-11-21 at 14 59 56

Example impl for `Show Kotlin Bytecode` is [here](https://github.com/JetBrains/kotlin/blob/8203d1c3fea187257d88bc165eafcb6026a2690e/idea/idea-jvm/src/org/jetbrains/kotlin/idea/actions/ShowKotlinBytecodeAction.kt#L29)
addAnAction(
        "ExampleEmptyToolWindow",
        anAction(
          icon = ArrowIcons.PURE,
          actionPerformed = {e ->
            /**
             * creates Toolwindow with [e]
             * set's the icon
             * ContentManager adds our Content
             * This Content can be composed of [EditorTextField], which is IntelliJ's promoted editor component with syntax highlighting support, code completion, code folding and more.
             */
          }
        )
      )

from arrow-meta.

raulraja avatar raulraja commented on May 20, 2024 1

Can we have the above linked icons rendered on the markdown table to see what they look like?

from arrow-meta.

raulraja avatar raulraja commented on May 20, 2024

We need a table that looks like this for all plugins and involve several people to fill this in.

Plugin Action Icon Description Expanded Description
Purity Inspection [pic here] This function is impure... This function is impure..., Docs to IO, suspend, Fx etc

from arrow-meta.

i-walker avatar i-walker commented on May 20, 2024
Plugin Feature Icon Description Expanded Description
Comprehensions LineMarker arrow-meta-bind arrow-meta-bind.svg "Bind" -
Nothing LineMarker arrow-meta-nothing arrow-meta-nothing.svg "Bottom Type" -
HigherKinds LineMarker arrow-meta-higher arrow-meta-higher.svg ${class.name} is a Higher Kinded Type that may be used in polymorphic functions expressed over [Kind<F, A>] and with the type classes. For more info visit https://arrow-kt.io/docs/patterns/glossary/#type-constructors -
HigherKinds LineMarker arrow-meta-polymorphic arrow-meta-polymorphic.svg here is an example -
Purity Inspection arrow-meta-pure "Function should be suspended" -
Optics LineMarker arrow-meta-optics arrow-meta-optics.svg "Optics" -

from arrow-meta.

raulraja avatar raulraja commented on May 20, 2024

Both approaches are things we can use for different purposes. What about embedded media like gifs or videos. Is that possible or does that require some other kind of panel?

from arrow-meta.

i-walker avatar i-walker commented on May 20, 2024

Gifs should be possible, but I can not confidently confirm whether videos are possible. There might be a workaround to do that.

from arrow-meta.

i-walker avatar i-walker commented on May 20, 2024

The editor defines it's UI with an initial wrapper, which holds it's Content.

We can use 4 existing UI wrappers/ templates from the editor:

  • Tool Windows proposed here #131 (comment)
  • Dialogs they provide visuals to then trigger AnAction with the supplied information of the user. They can look as simple as this (UserInput) -> AnAction:

Screenshot 2019-11-21 at 19 44 25

  • PopUps: They're similar to Dialogs, but without explicit closing buttons and reduce to a Function (UserInput) -> AnAction
    shot
    example from above

  • Notifications: Can be invoked everywhere and display text, with an Icon.

addAnAction(
        "ExampleNotification",
        anAction(
          icon = ArrowIcons.BIND,
          actionPerformed = { e ->
            Notifications.Bus.notify(
            Notification("GroupDisplayId", "Arrow", "COntentLepsum", 
             NotificationType.WARNING)) // this Notificitation can hold an Icon
          }
        )
      )

Screenshot 2019-11-22 at 15 19 48

Or start from scratch with our own workflows. This requires us to maintain the lifecycle of the wrapper in the application in addition to the Content.

The initial four elements wrap our Content in templates, where we can focus on the Content.

Regardless of a design choice,
the UI is based on Swing Components wether for the Content or the wrapper. Interestingly enough, we could facilitate the existing wrapper, but still, have the freedom to define our own workflows in the Content element.

from arrow-meta.

raulraja avatar raulraja commented on May 20, 2024

I see on the table we are missing unions and type classes extensions. Also type proofs which even if not merged yet will be there by KC

from arrow-meta.

i-walker avatar i-walker commented on May 20, 2024

This PR provides drafts over the aforementioned UI wrappers
#214

from arrow-meta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.