ondras / wwwsqldesigner

WWW SQL Designer, your online SQL diagramming tool
https://sql.toad.cz/?keyword=online_library
BSD 3-Clause "New" or "Revised" License
2.86k stars 722 forks source link

love sql designer #329

Open dataf3l opened 4 days ago

dataf3l commented 4 days ago

used it for many years! so this "var ai=" thing may have a problem with upcoming changes on the browser, as it hides window.ai maybe it should be renamed.

https://github.com/ondras/wwwsqldesigner/blob/a8be2f2197f84f5427d6b5671470140af6280f02/js/row.js#L392

have an awesome day!

ondras commented 12 hours ago

Hello @dataf3l,

can you please elaborate a bit on the upcoming changes on the browser? I am not aware of any API that surfaces via the window.ai global variable. Moreover, the variable defined at https://github.com/ondras/wwwsqldesigner/blob/a8be2f2197f84f5427d6b5671470140af6280f02/js/row.js#L392 is local and not global.

dataf3l commented 7 hours ago

Hi Ondras! I love your software since 2009 or so, I am surprised by the dedication to continue to improve on it! I used it many times, it was always a pleasant experience, compared to the tools available at the time!

  1. The name of the thing is built in ai https://developer.chrome.com/docs/ai/built-in (sadly no code snippet is there, but like, it's coming, some discussion about that can be read here https://news.ycombinator.com/item?id=40834600
  2. The local variable hides the ai object for code further down the line in the same scope which may (as in, like, maybe) require it
  3. Such code may exist in the future, hypothetically, in many applications that receive text from users
  4. It's similar to saying var navigator = xyzzy and then wondering why further down the line the navigator.userAgent object suddenly doesn't work and returns undefined, it may lead to silent bugs, so I say let's leave the variable name to be owned by the browser.

have an awesome day