Open cgalvarez opened 7 years ago
Over all I really like these adjustments. The only thing I'm not sure about is the sorting of arrays. My concern is that in general PHP sorts array keys internally in the order they were added to the array. If as user expects their arrays to follow PHP internals this might be confusing to see the keys order alpha-numerically. Thoughts?
Hi @cchamplin . I'm currently a little busy, but I'll try to split these features into multiple PRs ASAP.
The sorting of arrays is made only in the variables inspector widget to ease the searching of specific keys. I found it invaluable when searching for keys in $_GLOBALS
or $_REQUEST
. You can always get the real order by entering the variable in the console if you want.
BTW, the distribution shown in the screenshot and some styles are not included in this PR (I mean the icons and the layout of the widgets and the styles of the stack context, for example). I'm applying them through a customized styles.less inside Atom. Do you want me to make another PR for these styles as well?
@cgalvarez These are split into a few PRs. I've tried to use the --author flag when committing hopefully this gives you credit. I'm not sure how well that will work though, feel free to re-split them or pull them into your account and resubmit the PRs.
Concerns addressed by this pull request:
Console
alt+up
/alt+down
(when focused on the input of the text editor inside the console panel). It's useful when you want to execute the same code multiple times or the last executed command contained an error.Context var list
length
property of a context variable isundefined
. It happens to me with$GLOBALS['GLOBALS']
, for example, which is shown as$GLOBALS['GLOBALS'] array[undefined]
, but its value is reallyArray[0]
.bool
values are printed correctly astrue
/false
(previously was being printed as1
/0
).ksort()
(string keys first, numeric ones then). Numeric keys are not enclosed between quotes anymore. This improves readability, since it's far easier to find any variable/key/property.language-php
package. This way, one uses the same color codes in the editor and the panels from this package.syntax--property
andsyntax--numeric
/syntax--string
depending on the type.span
is provided with a class with the value type:syntax--array
,syntax--bool
,syntax--error
,syntax--null
,syntax--numeric
,object
,syntax--resource
,syntax--string
, orsyntax--uninitialized
.span
item uses the samesyntax-php
from the packagelanguage-php
.Locals
/Superglobals
/User defined constants
) have the classsyntax--type
.Editor
Here is a screenshoot showing the improvements:
DISCLOSURE: I've made some CSS customizations apart. If some users like it, I could ship them with the PR (like the
=
and:
to separate variables/keys/properties from their values, or the layout of the panels).