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

How to define auto-complete strings for use in [somename#... #6

Open
tonhuisman opened this issue Dec 19, 2022 · 9 comments
Open

How to define auto-complete strings for use in [somename#... #6

tonhuisman opened this issue Dec 19, 2022 · 9 comments

Comments

@tonhuisman
Copy link
Contributor

I have tried to add definitions for the task-specific settings, as added in ESPEasy via PR 4421, but then the auto-complete doesn't seem to work in the Rules editor when trying to use [<taskname>#...] (to fill in the ... part), probably because it is trying to insert some other values/events that have a # included. I have found that there is some explicit handling for # but I don't understand yet how that is to be modified to get it working as auto-complete.

My JS skills are not that great, and my understanding of this code isn't that in-depth either, so can you suggest how to implement that, or, as an alternative, on how to specify these auto-complete values?

@chromoxdor
Copy link
Owner

I am unfortunately a bit busy the next couple of days but as soon i find the time i´ll look into that.

I don't understand yet how that is to be modified to get it working as auto-complete.

Adding simple keywords i one thing but autocompletion easily breaks if it deviates from the scheme i´ve given it.
I will need to have a closer look to understand what i did there.

My JS skills are not that great, and my understanding of this code isn't that in-depth either, so can you suggest how to implement that, or, as an alternative, on how to specify these auto-complete values?

This project and easyfetch are the first real programming experiences i have with any language. And this started last october. :) But i can try to initiate you into the crocked depths of my programming...

chromoxdor added a commit that referenced this issue Dec 19, 2022
@chromoxdor
Copy link
Owner

I just did a quick fix... either you download the html and js files and edit the html file to direct to the local js or you wait until it has been updated on jsdeliver.

  1. I forgot to define the AnythingElse wordlist (it was only covered by catching it later through %...%)
  2. I had to remove # from the wordlist regex. It was handled as a character of a word for generating the list of words that are not included in the defined wordlist (problem now... var#1 for example is not recognized as one word for suggestions. this was actually a good thing because i could see which vars where already in use. I think i will write an exception to accommodate for this)

@chromoxdor
Copy link
Owner

you wait until it has been updated on jsdeliver.

I forgot the minified files so waiting made no sense :)

I made a new category for task specific stuff called taskSpecifics
since we introduced . for settings i had to accommodate for that. There is a chance that this might cause problem somewhere else but i can´t think of anything right now so testing will tell.
var and int got their exceptions since i really like that feature but if it collides with anything else or if found to be not usefull by the majority i will undo it.

@chromoxdor
Copy link
Owner

settings are grayed out until a word + # precedes

setting

@chromoxdor
Copy link
Owner

chromoxdor commented Dec 20, 2022

How should we proceed with commits to ESPeasy.
Last time i checked your PRs weren’t merged so if i also do a PR now it could get a bit messy. What do you think. You are the expert. :)
I also thought of using the js files in ESPeasy for the HTML-Site in this repository. But then i have to wait for Updates like everyone else since i am dependent on you for merging changes...

@tonhuisman
Copy link
Contributor Author

I'll discuss with TD-er tonight what the best strategy would be. Having your repo as the main source for this would be best I assume, but I don't think we want to go and use npm for packaging and including 😱

Last I checked there were some differences between the .js code here and what's in ESPEasy, is that still the case?

dependent on you for merging changes...

Currently only TD-er (and probably grovkillen) can merge PRs in ESPEasy, I don't have those 'powers' 😄

@chromoxdor
Copy link
Owner

but I don't think we want to go and use npm for packaging and including 😱

This is the reason why the change of EasyColorCode to codemirror 6 is stalling right now.. npm is still a mystery for me 😳

@chromoxdor
Copy link
Owner

Currently only TD-er (and probably grovkillen) can merge PRs in ESPEasy, I don't have those 'powers' 😄

In my opinion you should have this power since you earned it. :)

@tonhuisman
Copy link
Contributor Author

In my opinion you should have this power since you earned it. :)

Lets keep the innocent protected 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants