mulesoft / api-designer

A web editor for creating and sharing RAML API specifications
Other
1.07k stars 267 forks source link

Changing the file header makes the drawer dissapear #344

Open fschargorosdky opened 9 years ago

fschargorosdky commented 9 years ago

If the user changes the

#%RAML 0.8

at the beginning of the file, the bottom drawer disappears and doesn't return until the header is fixed.

If the user changes only the version in the header, it only displays an item: #%RAML 0.8 Placing the cursor in another lines displays all the items as designed

sichvoge commented 9 years ago

What's the issue? The header is used to identify that the current document is a RAML file. If you don't have that, the API Designer does not recognise it as such and therefore the drawer disappears.

fschargorosdky commented 9 years ago

The problem is when an inexperience user enters, clicks a drawer option and modifies the header. The drawer disappears and the user has no idea what he did wrong.

sichvoge commented 9 years ago

OK understand - what do you think could be a good way to prevent/notify the user?

fschargorosdky commented 9 years ago

If it's a .raml file with a wrong header notify the user and propose him a correct header. Perhaps mark it as a syntax error

sichvoge commented 9 years ago

The problem here is that you could have RAML files without a header as well as they might be child type files for a parent RAML that contains the header