* src/client/Client.js (_defaultId): New property.
(__construct)[default_id]: New parameter. Set `_defaultId'.
(_getProgramId): Use `_defaultId' if not found in URL.
* src/ui/nav/HashNav.js (_initUrl): Do not require leading program id.
This technically worked fine before with our URL scheme, but that is not
guaranteed to be the case generally.
This is something that managed to slip by (but not unnoticed) for almost
exactly one year to this day (028606242a). It
can only be reproduced by changing classes that result in visibility changes
differing on the same field by index. The issue hides itself on first
load (because all fields are shown by default) and on refresh.
The problem is that, when one index shows a field but another hides it, the
hide overrode the show indexes, so only the hide took place.
* src/client/Cmatch.js (markShowHide): Make virtual. New implementation to
support concurrent show/hide.
(_handleClassMatch): Use it.
* test/client/CmatchTest.js: New test.
* npm-shrinkwrap.json: ease.js v0.2.{8=>9}.
This is to give us a fairly easy means of testing this logic for a bugfix.
This refactoring also obviates a pretty nasty bug; see docblock.
* src/client/Cmatch.js (_handleClassMatch): Extract show/hide marking.
(markShowHide): New method.
This makes the minimal number of changes necessary to ensure that all object
references remain available. It is a mess.
And despite moving all of this, Client is still a massive clusterfuck.
* src/client/Client.js (system): Add import.
(_cmatch): Now references new Cmatch class instance.
(_cmatchHidden, _classMatcher): Remove fields.
(_forceCmatchAction): Rename to `forceCmatchAction'.
(_hookClassifier, _postProcessCmatch, _cmatchVisFromUi, _handleClassMatch,
_mergeCmatchHidden, _clearCmatchFields): Extract methods. Update
references as necessary.
(getCmatchData): Remove unused method.
(_handleError): Rename to `handleError' to make accessible to
Cmatch. Update references.
* src/client/ClientDependencyFactory.js (FieldClassMatcher): Remove import.
(createFieldClassMatcher): Remove method. See `system/client'.
* src/client/Cmatch.js: New class.
* src/system/client.js (Cmatch, field): Add imports.
(cmatch): Add export.
All of the old events have been removed!
* src/client/Client.js (handleEvent): Remove remainder of old system (after
last commit, all that was left was error handling). Correct docblock.
The `set' event already existed---this merely extracts it into its own
handler.
* src/client/Client.js (handleEvent): Extract `set' handler.
* src/client/ClientDependencyFactory.js (createClientEventHandler): Add
`set'.
* src/client/event/ValueSetEventHandler.js: New class.
* test/event/ValueSetEventHandlerTest.js: Associated test case.
This matches the behavior of assertions.
This needs to be refactored into an even handler.
* src/client/Client.js (handleEvent)[set]: Use last available index.
* src/ui/ElementStyler.js (setValueByName)[change_event]: Re-add
`change_event' check, but as a warning instead of an Error. This
shouldn't be used anymore, but let's be certain _without_ breaking
things.
The intent wasn't go have this be permanant, and apparently it _is_ being
used in generated code!
* src/ui/ElementStyler.js (setValueByName): Remove error on `change_event'.
Useful for random historical facts that give useful context for developers
of Liza. It hopefully helps to mitigate some of the issues of Theory
Building as noted by Peter Naur.
* doc/liza.css: Refactor some styles to make them more concise.
(.trivia): Add styling.
* doc/macros.texi (trivia): Add macro.
Continued eradication of jQuery for performance reasons.
* src/ui/ElementStyler.js (setValueByName): Do not use jQuery for
legacyradio styling. Throw exception on `change_event' argument set (this
should no longer be used).
This used to be a thing back when we used Dojo, but it doesn't appear to be
used anymore.
* src/ui/ElementStyler.js (setValueByName): Remove `autochange' check.
Lines starting
The primary motivation behind this change was documentation of
links. Developers (including myself---it's been a while) misinterpreted
then as references to existing groups, not arbitrary names.
* doc/program.texi (Defining Groups): New section.
(Group Styles): Reference to new section.
* doc/liza.css: Each of the entities below may have additional selectors
following them, not listed here.
(.doc-notice.dev): Renamed to `.devnotice'.
(.doc-notice.devnotice, .doc-notice.devnote): New classes.
* doc/macros.texi (devnotice): {dev=>devnotice} @noticestart argument.
(devnote): New macro.
These animations are ugly and slow when there are many questions on a
step. I've wanted them gone for quite some time, and now we don't have a
disagreement among developers.
* src/client/ClientDependencyFactory.js (createNaFieldStyler): Remove
NaFieldStylerAnimation mixin.
* src/ui/styler/NaFieldStylerAnimation.js: Remove trait.
This is necessary to truncate on index removal; otherwise, it's not possible
to remove indexes through the editor.
* src/client/debug/BucketClientDebugTab.js (_getStagingButtons): Append null
on value change.
An error was being thrown because there are no siblings to reference when
there is only a single group. Obviously sorting is not even needed in such
a situation.
src/ui/step/GeneralStepUi.js (_sortGroups): Abort if <= 1 groups.
Configurable via the `pidfile' config option.
* bin/server.js: Accept `pidfile' config. Include path in greeting.
(writePidFile): Write to `pidfile' and unlink after exit.
* conf/vanilla-server.json (pidfile): Add configuration key.
Was outputting NaN, because the property that was being used no longer
existed after previous changes.
* src/server/daemon/Daemon.js (_initHttpServer): Use HTTP port number
in output.
This isn't ideal, but will allow using daemons classes from anywhere
on disk.
* bin/server.js: Interpret daemon path as relative to conf file path.
* conf/vanilla-server.json: Use relative path to `DevDaemon'.
Previous to this change, we'd write the clear to the database, but
then immediately after, the quote save would restore it. Oops.
* src/server/Server.js (_monitorMetadataPromise): Clear data in
metabucket rather than directly invoking a DB call. This will be
applied when the quote is saved.