Giter Club home page Giter Club logo

Comments (6)

chexxor avatar chexxor commented on June 6, 2024 1

As a UI for the Aura components - each file has to have the same name as its bundle, which makes the UI a bit simpler.

When I am in any file in my project, the following flow should suffice:

:ApexNewFile

Select File Type:
> 5. AuraComponent

Please Enter Bundle Name:
> "ExpenseList"

Please Enter Component Type:
1. Application
2. Component
3. Design
4. Event
5. Interface
6. Controller
7. Helper
8. Renderer
9. SVG Image
10. Style
11. Documentation

> 7. Helper

From this, we can derive the appropriate file name. src/aura/ExpenseList/ExpenseListHelper.js. We would need a template for each of those Aura component types to use when generating that file.

If we want to make a custom command to enable addition of component to an existing bundle, which skips the "Please Enter Bundle Name" step, we can think of that later. The most general-case solution seems like the correct first step.

Sidetracking chatter ---
I agree with your opinions on Aura. I'd rather choose a data-structure-based architecture, like Elm, than a component-based architecture, like Aura. Component-based architecture encourages creating lots of little bits of state, which becomes difficult to keep in sync.

But, Aura is an excellent tool for SFDC. SFDC users need little custom elements which can be dropped in different places of their SFDC system - standard detail pages, SF1, Visual Workflow, dashboards, etc. Building individual components is perfect for that.

Aura does not, however, make multi-view SPAs simple to make. Cross-component communication is not easy, offline mode is not considered, having all components in a SPA share a single data structure (which I prefer) is not easy.

from vim-force.com.

neowit avatar neowit commented on June 6, 2024

Hi Wes,

insert/delete/update/query for all aura file types is fully supported but there is currently no file templates or wizard to create various types of aura files.
So if you are editing an aura file, or have aura file(s) in your project and call :ApexSave or :ApexDeploy then changes you have done to aura files locally will be saved/deployed as expected.

If you have existing lightning bindle(s) in your org then :ApexRefreshProject will pull it locally and you can work with files under lightning/aura bundle folders as with any apex, VF, or static resource stuff.

If you need to create new aura related files/folders then you can either use standard vim/file-system tools to create relevant files/folders or use SFDC Developer console and then call :ApexRefreshProject to bring new files locally so you could start working with them.

Main reason for not having a wizard for creating blank aura files in vim-force.com plugin is that I have not decided yet how to do that UI wise in vim.
Simplest option would be to just extend :ApexNewFile menu, but this would have to take into account what aura bundle you are currently in, or ask for bundle name before creating every file. I am not too sure about this. The way how it is done in SFDC Developer Console I do not like either.

If you have any suggestions on how to present aura bundle/file creation in vim UI please let me know.
Bear in mind that this should work for various scenarios

  • when I am inside Apex class and want to start new aura bundle
  • when I am inside Apex class and want add a new file to existing bundle (there may be more than 1 bundle already)
  • when I am inside aura file and want to add new file to the same bundle
  • when I am inside aura file and want to start new bundle
  • when I am inside aura file and want to add new file to a new same bundle
  • etc.

Additionally, aura/lightning is yet to convince me that it has any real advantages over let's say AngularJS based app embedded in a VF page, hence the amount of attention this area of plugin receives is also limited.

from vim-force.com.

neowit avatar neowit commented on June 6, 2024

Hello @chexxor,

Thank you for your suggestions.

You are probably right - the simple way may be the best way, even though it involves several steps and generally does not feel "vim like".
I do not particularly like the Dev. Console way of adding new aura files and thought that with time someone can come up with a better UX for this.

from vim-force.com.

chexxor avatar chexxor commented on June 6, 2024

What's wrong with the dev console way? Having that sidebar?

You have to create a ton of files, which leaves you with tons of tabs - I'm
not a fan of that.
On Aug 2, 2015 05:23, "Andrey Gavrikov" [email protected] wrote:

Hello @chexxor https://github.com/chexxor,

Thank you for your suggestions.

You are probably right - the simple way may be the best way, even though
it involves several steps and generally does not feel "vim like".
I do not particularly like the Dev. Console way of adding new aura files
and thought that with time someone can come up with a better UX for this.


Reply to this email directly or view it on GitHub
#43 (comment)
.

from vim-force.com.

neowit avatar neowit commented on June 6, 2024

When I mentioned Dev Console I meant the way you have to create Aura bundles/files in it. It is very straight forward, but does not feel optimal to me.
I do not have a better suggestion however, so can't really complain.

from vim-force.com.

neowit avatar neowit commented on June 6, 2024

Closing as 'won't do'
aura is a pretty much dead technology in 2021 and there is no good reason to create new aura components when LWC exists.
Suggestions above were incorporated in 90d598e to support LWC bundle creation.

from vim-force.com.

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.