mattduffield / frontendcreator

23 stars 3 forks source link

Managed to confuse FEC, by acting dumb #28

Open adriatic opened 6 years ago

adriatic commented 6 years ago

As you cannot hope to sell FEC only to smart users, you need to fix this confusion I created and explained in Question on "Using entity" gitbook section problem report.

I created the my-contact object (without proper understanding what type it should be) and added it to the project like this

image

Note the absence of any extension in the 'View/ViewModel name' object name definition.

FEC happily took this name - and I am not in a trouble, where "my-contact" is not present in the project tree, is shown as opened -- and it cannot be closed nor deleted - see below:

image

I am guessing that the object's name is supposed to include 'html' extension (a view of course πŸ˜„)

Two observations:

  1. The FEC shows this URL 'https://frontendcreator.com/app/projects/entity-demo/src~my-contact' (note the '~' character in the path (?? is this intended)

  2. The Chrome console shows:

    tree-node:setCurrentView Object true
    59418231c2ef166dffd4847a.blob.core.windows.net/contact-manager-ni?restype=container&_=1521820049406 Failed to load resource: the server responded with a status of 404 (The specified container does not exist.)
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/.cfg/project-manifest.json targetContainer contact-manager-ni name .cfg/project-manifest.json
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/README.md targetContainer contact-manager-ni name README.md
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/assets/business-man.png targetContainer contact-manager-ni name assets/business-man.png
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/assets/business-woman.png targetContainer contact-manager-ni name assets/business-woman.png
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/index.html targetContainer contact-manager-ni name index.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/app.html targetContainer contact-manager-ni name src/app.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/app.js targetContainer contact-manager-ni name src/app.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/main.js targetContainer contact-manager-ni name src/main.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/attributes/data-sort/data-sort.js targetContainer contact-manager-ni name src/resources/attributes/data-sort/data-sort.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/data-filter/data-filter.css targetContainer contact-manager-ni name src/resources/elements/data-filter/data-filter.css
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/data-filter/data-filter.html targetContainer contact-manager-ni name src/resources/elements/data-filter/data-filter.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/data-filter/data-filter.js targetContainer contact-manager-ni name src/resources/elements/data-filter/data-filter.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/data-pager/data-pager.css targetContainer contact-manager-ni name src/resources/elements/data-pager/data-pager.css
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/data-pager/data-pager.html targetContainer contact-manager-ni name src/resources/elements/data-pager/data-pager.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/data-pager/data-pager.js targetContainer contact-manager-ni name src/resources/elements/data-pager/data-pager.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/listview/listview-item.html targetContainer contact-manager-ni name src/resources/elements/listview/listview-item.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/listview/listview-item.js targetContainer contact-manager-ni name src/resources/elements/listview/listview-item.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/listview/listview.css targetContainer contact-manager-ni name src/resources/elements/listview/listview.css
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/listview/listview.html targetContainer contact-manager-ni name src/resources/elements/listview/listview.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/listview/listview.js targetContainer contact-manager-ni name src/resources/elements/listview/listview.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/multi-selector/multi-selector-item.html targetContainer contact-manager-ni name src/resources/elements/multi-selector/multi-selector-item.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/multi-selector/multi-selector-item.js targetContainer contact-manager-ni name src/resources/elements/multi-selector/multi-selector-item.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/multi-selector/multi-selector.css targetContainer contact-manager-ni name src/resources/elements/multi-selector/multi-selector.css
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/multi-selector/multi-selector.html targetContainer contact-manager-ni name src/resources/elements/multi-selector/multi-selector.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/multi-selector/multi-selector.js targetContainer contact-manager-ni name src/resources/elements/multi-selector/multi-selector.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/nav-bar.html targetContainer contact-manager-ni name src/resources/elements/nav-bar.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/tab-control/tab-control.css targetContainer contact-manager-ni name src/resources/elements/tab-control/tab-control.css
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/tab-control/tab-control.html targetContainer contact-manager-ni name src/resources/elements/tab-control/tab-control.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/tab-control/tab-control.js targetContainer contact-manager-ni name src/resources/elements/tab-control/tab-control.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/tab-control/tab-item.html targetContainer contact-manager-ni name src/resources/elements/tab-control/tab-item.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/elements/tab-control/tab-item.js targetContainer contact-manager-ni name src/resources/elements/tab-control/tab-item.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/resources/index.js targetContainer contact-manager-ni name src/resources/index.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/services/my-data-service.js targetContainer contact-manager-ni name src/services/my-data-service.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/about/about.css targetContainer contact-manager-ni name src/views/about/about.css
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/about/about.html targetContainer contact-manager-ni name src/views/about/about.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/about/about.js targetContainer contact-manager-ni name src/views/about/about.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/customer-orders/customer-orders.css targetContainer contact-manager-ni name src/views/customer-orders/customer-orders.css
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/customer-orders/customer-orders.html targetContainer contact-manager-ni name src/views/customer-orders/customer-orders.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/customer-orders/customer-orders.js targetContainer contact-manager-ni name src/views/customer-orders/customer-orders.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/customer/customer.css targetContainer contact-manager-ni name src/views/customer/customer.css
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/customer/customer.html targetContainer contact-manager-ni name src/views/customer/customer.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/customer/customer.js targetContainer contact-manager-ni name src/views/customer/customer.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/customers/customers.css targetContainer contact-manager-ni name src/views/customers/customers.css
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/customers/customers.html targetContainer contact-manager-ni name src/views/customers/customers.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/customers/customers.js targetContainer contact-manager-ni name src/views/customers/customers.js
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/orders/orders.css targetContainer contact-manager-ni name src/views/orders/orders.css
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/orders/orders.html targetContainer contact-manager-ni name src/views/orders/orders.html
    app-bundle-2f69f08739.js:1 azure-storage-connector:cloneContainerGeneric - sourceUri https://fecstore.blob.core.windows.net/contact-manager/src/views/orders/orders.js targetContainer contact-manager-ni name src/views/orders/orders.js
    app-bundle-2f69f08739.js:15 tree-node:setCurrentView Object true
    app-bundle-2f69f08739.js:3 currentRecord Object
    59418231c2ef166dffd4847a.blob.core.windows.net/entity-demo?restype=container&_=1521837687593 Failed to load resource: the server responded with a status of 404 (The specified container does not exist.)
    app-bundle-2f69f08739.js:4 selectedMenuItem Object
    app-bundle-2f69f08739.js:4 application-service:refresh - container, folderName entity-demo src
    app-bundle-2f69f08739.js:4 application-service:refresh - projectBlobs Array(2)
    2app-bundle-2f69f08739.js:11 Uncaught TypeError: Cannot read property 'getDirtyStatus' of undefined
    at e.closeTab (app-bundle-2f69f08739.js:11)
    at t.evaluate (vendor-bundle-60c0af5654.js:7)
    at e.callSource (vendor-bundle-60c0af5654.js:9)
    at vendor-bundle-60c0af5654.js:9
    at HTMLDocument.te (vendor-bundle-60c0af5654.js:7)
    app-bundle-2f69f08739.js:4 selectedMenuItem Object
    2app-bundle-2f69f08739.js:11 Uncaught TypeError: Cannot read property 'getDirtyStatus' of undefined
    at e.closeTab (app-bundle-2f69f08739.js:11)
    at t.evaluate (vendor-bundle-60c0af5654.js:7)
    at e.callSource (vendor-bundle-60c0af5654.js:9)
    at vendor-bundle-60c0af5654.js:9
    at HTMLDocument.te (vendor-bundle-60c0af5654.js:7)
adriatic commented 6 years ago

My guess was right, but FEC should not count in that (if the extension is missing or not-recognized, raise the hell at the earlies possible time)

image

adriatic commented 6 years ago

Last issue in this context. The gitbook guide is older than FEC, so the screenshot used in the guide is not representative of the actual situation:

image

Compare this situation with the screenshot above, where I have the Designer available as a consequence of my object being a view (HTML file). I still do not see where to grab the "screen object" that in the guide looks like this: image

mattduffield commented 6 years ago

Hi @adriatic,

This first issue you mention is definitely a bug. We will work on it to ensure that it behaves as it should. You should only provide a name for the view and view model without an extension as it will add the ".html" and ".js" extensions automatically.

The second screen shot you provided will be fixed along with the first.

The last issue and screen shot are of an older version of FEC. Those other tabs are no longer necessary since the new UI changes. Also, any documentation referencing a screen is now obsolete. Previously, we saved all screens as JSON but this required extra ceremony for you to provide your own view model logic. This has now been reworked to mirror exactly what you would have in Visual Studio Code or any other desktop editor.

Hope this helps! We will start recording our new documentation scripts soon.

adriatic commented 6 years ago

Hello @mattduffield

The last issue and screen shot are of an older version of FEC. Those other tabs are no longer necessary since the new UI changes.

Can you please tell me what is that "screen object"? Is it a prebuilt component from the set of designer's palette (shown below)

image

or (more likely) a form that I have to assemble manually to look like the like this:

image

This section continues at More questions on Use Entity section of the guide.

mattduffield commented 6 years ago

Hi @adriatic, the previous version of FEC was 100% JSON based. This meant that metadata was the sole engine for creating screens/views. There were no physical files. Although this was nice, it required an extensive amount of work and design to support any type of flexibility when creating web applications. This required the creation and design of screen objects that were managed by the FEC engine as well as JavaScript functions that were stored as JSON. When an application was previewed, it would go through the process of stitching all of the pieces together. There were certain limitations with this approach especially when consider using FEC outside of Aurelia. This approach has been deprecated in favor of the file system approach that much more closely mirrors what developers actually do on their own development machines.

The New Screen dialog is no longer necessary as you can create a new html file whenever you want.

We will correct the documentation soon.

Hope this helps.

adriatic commented 6 years ago

Thanks - I believe that your explanation says that an empty HTML file cannot be represented by JSON - so you needed to have something more concrete (a screen object) for that role.

mattduffield commented 6 years ago

Not exactly. The blank tab is a valid bug. We use mime-type matching for the editor and when it can't find a match it is blank. This needs to be corrected in the next release.

adriatic commented 6 years ago

Not exactly. The blank tab is a valid bug

What blank tab? can you please write the correct set of sentences that start with (section from FEC Guide):

We are going to create a new screen, my-contact that will utilize the new Contact Entity we created. In case you have not created a project, create one called, Demo. Next, add a screen called, my-contact. Entity Builder Screen

Please note that I am not rushing you to fix the complete guide - just get me the ending of this section so I can learn how to use an entitty

mattduffield commented 6 years ago

@adriatic The blank tab can easily be seen as the my-contact.html tab in FEC from the image you provided above. This is what I was referring to and apologize for any confusion in my response. Will try and get this section working so that you can use it in the current version of FEC properly.

adriatic commented 6 years ago

OK, that is what I suspected to be the case - instead of the "screen object" which is rendered in the guide as

image

I supplied the (empty) file my-contact.html "out of desperation", not knowing how to pull a view out of my hair πŸ˜„ . Naturally, this resulted in this situation shown below:

image

While I have the feeling that we are both seeing this the same way, but not quite 😏

So, can you tell me the answer to this: what view object do I need to provide instead of the no more existing screen-object in order for this example gets a happy-end.

This is, by the way, the meaning of my original question above that you keep not answering.

If the answer is "too complicated to explain in this discussion" - that is perfectly fine, I can wait endlessly for the corrected Guide πŸ˜„