Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2016 spring cleaning #36

Open
Ingramz opened this issue Mar 13, 2016 · 0 comments
Open

2016 spring cleaning #36

Ingramz opened this issue Mar 13, 2016 · 0 comments
Labels
enhancement Request for a new feature. help wanted The maintainers of package are welcoming pull requests that solve the issue.

Comments

@Ingramz
Copy link
Collaborator

Ingramz commented Mar 13, 2016

Blade has evolved quite a lot during the past year and the amount of downloads for this package has more than doubled during that time! Thank you to everyone who has upped the counter during that time 😃

While there are very few issues left to solve (or people just don't report them), I think we can do better.

  1. The current grammar is rather short, around 100 lines, but it's undocumented, making it a little hard to maintain or understand what goes where when adding a new keyword. In the process I am planning to expand the compacted regular expressions into longer chunks for better readability and making it easier for others to add stuff.
  2. Adding tests. But instead of just doing what core Atom language repositories do, I think we should be running our test fixtures against the blade compiler itself as well, that resides over at https://github.com/illuminate/view , if something changes there, it might be a good indication that we need to change something too. Also getting notified of new features would be a great feature for us so someone could implement those quickly.
  3. Revamping the documentation of this repository - update README.md, add LICENSE.md, CONTRIBUTING.md and {ISSUE,PULL_REQUEST}_TEMPLATE.md. This should improve the quality of upcoming bug reports a great deal. For the license I am thinking of MIT license.
  4. Snippets - while I personally don't write code using them, they work rather well for me as a reminder what one is supposed to write. So one could conclude that the snippets we have at the moment could be in a lot better shape than they are at the moment in order to write anything efficiently with them. @slayerfat, what do you think, can we work together to provide a single package (this one) for all of the Blade awesomeness?
  5. Grammar scopes - we've had a lot of trouble with this for the past year. Typically the problem is that the scope names that are semantically correct might not look that pretty with different themes (not highlighted at all or is highlighted the same way as HTML tags etc...). I think we should find some outside help or at least devise a plan how to improve consistency between different themes (see what core or more popular packages do).
  6. Atom issues. There are some which have lead me to use hacks. It would be great to document those as issues in other repositores and keep a reference to this repository.
    1. This grammar is 2300 lines long, and not 200, because first-mate doesn't properly support recursive grammar scopes. The workaround was to take PHP grammar, which injects into language-html, add our changes into it and keep it in sync with Atom releases.
    2. Because language-php grammar is a big mess that just works, nobody has taken their time to properly implement matching parentheses inside the grammar. Currently our grammar is limited to highlighting code such as @if (myfunc($myvar)) on a single line. If PHP grammar supported matching parentheses, we could adapt our grammar to multiple lines and this way handle very complex use cases.
    3. Some Atom component (probably first-mate again) doesn't support zero-width tokens. Because of that packages such as autocomplete in cases such as {{|}} where | is text cursor, cannot recognize that they are inside the PHP grammar scope and keep providing Blade's shortcuts. The hack to solve this is to mark the first closing } as part of PHP grammar scope, which I nicely covered up with some CSS so it would work with any theme.

In summary all of those things are rather small alone, but together they are still a lot of work. There are things from which others can benefit. I'll probably work on some things during Good Friday weekend (I am thinking of taking 1, 2 and 6). Others (except 3) might require more time, but I think we can find a reasonable solution in reasonable time.

Suggestions/thoughts are welcome.

cc @jawee

@Ingramz Ingramz added enhancement Request for a new feature. help wanted The maintainers of package are welcoming pull requests that solve the issue. labels Mar 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for a new feature. help wanted The maintainers of package are welcoming pull requests that solve the issue.
Projects
None yet
Development

No branches or pull requests

1 participant