Meteor 1.3.1 and delay simulation - meteor

I'm trying to add Meteor._sleepForMs(2000); or even Meteor._sleepForMs(20000); to my publication and nothing happens.
How I can add delay??

Related

How to display links in storybook next to title?

I'm trying to show 'copy' links when user hovers on heading:
In storybook ducumentation sometimes it works:
https://storybook.js.org/docs/react/writing-docs/mdx#documentation-only-mdx
And sometimes not:
https://storybook.js.org/addons/#storybook/addon-links
How do I enable them? What I've tried - I've copied code from storybook's github - I thought that top links somehow get mapped later to the headings, but no luck so far
- [Basic example](#basic-example)
- [MDX-Flavored CSF](#mdx-flavored-csf)
## Basic example
## MDX-Flavored CSF
do I need any addons to handle that?
The problem is that headings ids are not generated by remark-slug package here -- in HeaderMdx it doesn't go into if condition because no id was provided and function returns regular <Header> instead of <HeaderWithOcticonAhchor>
Based on this thread this was broken after 6.4.19 and fix was pushed into 7.0.0
So solutions are:
downgrade, though its not obvious to me how to do that yet
upgrade to 7.0.0 (which is in alpha18 as of now)
postinstall patching of latest 6.5.0

Uno Platform Pathicon no longer displays correctly

My app uses PathIcon for the bottomnavigationbar. There was an update on the package Uno.UI - it was the update from 3.10.0-dev.474 yo 3.10.0-dev.479. Once I updated to 479 or later- my pathicons are now washed out- to the point where I can barely see them. The code in my app has not changed. What should I do? For now I have reverted to 474.
Here is an example:

Using meteor.js together with react-three

I am trying to try running meteor together with react and react-three library, that wraps three.js for react. As there are no atmosphere package for this, I am looking into either wrapping it myself or any other method how to use it.
1) How to wrap react-three library into meteor package?
I have tried downloading react-three repo, running npm run build and then using resulting react-three.js with package code written like this:
Package.describe({
summary: "react-three wrapped",
version: "0.8.0",
name: "myname:react-three",
});
Npm.depends({
"react-three": "0.8.0"
});
Package.on_use(function(api) {
api.versionsFrom("0.9.0");
api.use('limemakers:three#=0.73.0',['client','server']);
api.add_files([
"lib/react-three.js"
]);
api.export("THREE");
api.export("ReactTHREE");
});
but this does not seem to do the deal, no ReactTHREE is exported. Might be because of the way react-three build process works. Could you point me into the direction on how to build and wrap it properly?
2) Maybe it is possible to use it directly?
I tried meteorhacks:npm, but it seems that it is server side only. Anything else that could work?
Meteor 1.3-beta was just released and it has support for js modules, although I haven't had the opportunity to test it.
This article has good documentation.
https://github.com/meteor/meteor/blob/release-1.3/packages/modules/README.md

Auto-renaming of new Archetypes objects (Plone 4) stopped to work

I have a Plone 4 site which stopped to rename new Archetypes objects; after creation (as something like /temp/portaltype.2015-04-23.1234567890) and saving the first changes, including giving it a title, it should be renamed to something nicer (/temp/an-object-with-a-meaningful-name), but this doesn't happen anymore.
Perhaps the problem arose when I applied some changes to update Plone from 4.3.3 to 4.3.4 (to make one step at a time); but I have inherited a long versions.cfg which is solely sorted by package names and doesn't include any hints why certain versions were chosen ...
I'm able to go back two months and have a version which does the renaming, but without more knowledge about what to look for, it will be a very time-consuming process of re-applying every single change, rebuilding, starting and testing; but there have not been any changes to my schema definitions. I have a temp browser which is involved in delivering the primary edit form. but this doesn't seem to be the case for the saving action.
Sadly I don't fully understand yet the mechanisms of the base_edit action which should - as far as I understand - call Archetypes.BaseObject.processForm and implicitly ._renameAfterCreation, so I'd be grateful for some pointers how to debug this. Thank you!
Update:
I have a few triggers in my product's configure.zcml, e.g.:
<subscriber
for=".content.portaltype.PortalType
Products.Archetypes.interfaces.IObjectInitializedEvent"
handler=".events.onInitPortalType"/>
… with, in events.py:
def onInitPortalType(self, event):
"""
Called after first edit of new objects?
"""
print '/// onInitPortalType(%(self)r, %(event)r)' % locals()
setInitialOwner(self, event)
setStateToPrivate(self, event)
However, the event doesn't seem to be triggered, since I couldn't find the output in an instance fg session.
Update 2:
I noticed that zope.event had been pinned to a quite old version (3.5.2), so I'm trying to update to 4.3.4 more seriously now (following this how-to). This got me zope.event v4.0.3, but I have a version conflict now:
There is a version conflict.
We already have: zc.recipe.egg 1.3.2.
While:
Installing.
Getting section test.
Initializing section test.
Installing recipe zc.recipe.testrunner.
There seems to be a requirement for zc.recipe.egg < 2dev somewhere, but I can't find it.
Nothing significant changed between Plone 4.3.3 and 4.3.4 on Archetypes. Products.Archetypes changed from 1.9.7 to 1.9.8 and Products.ATContentTypes remains on the same version.
Pointers could be:
There's a _at_rename_after_creation flag, which is True by default. This can be changed on the content type class.
Is your type still activated in portal_factorytool? (Afaik this should have no impact on renaming after creation - but who knows :-))
Any Products.Archetypes.interfaces.IObjectInitializedEvent subscriber?
Issue I had once was, that the tmp id portaltype.2015-04-23.1234567890 had the wrong format and AT did no recognise it as tmp id and therefore it did not rename it after creation. The method AT uses to check if the id is autogenerated --> https://github.com/plone/Products.CMFPlone/blob/4.3.4/Products/CMFPlone/utils.py#L111 AFAIK the problem was, that the meta_type and portal_type was not the same anymore.

How do I tell robot-server to reset the test fixture when I use ride with Plone?

I'm trying to write my first robot test; I'd like to use ride as advertized in http://developer.plone.org/reference_manuals/external/plone.app.robotframework/happy.html#install-robot-tools
I added
initialization =
import os
os.environ['PATH'] = os.environ['PATH'] + os.pathsep + '${buildout:directory}/bin'
to my [robot] section to make it possible to run the tests clicking "Start" in ride.
It works, but the second time I run the tests I still see the content created by the first test run.
How do I tell robot-server to go back to a just-initialized state?
Easily (and you should throw me into pool for not documenting this yet in plone.app.robotframework's documentation – I thought that RIDE is too difficult to get running until it works on wxPython 2.9).
In RIDE
select Run-tab
change Execution Profile to custom script
click browse to select for bin/robot from your buildout as the Script to run tests
Click Start.
Technically bin/robot is a shortcut for bin/pybot --listener plone.app.robotframework.RobotListener (I keep repeating bin/, because it's important that plone.app.robotframework is available in sys.path). Robot Framework Listener -interface is specified in Robot Framework User Guide.
Our listener calls bin/robot-server (using XML-RPC) before every test to testSetUp-methods for the current test layer and after every test testTearDown-methods. This resets the fixture and isolates functional tests.

Resources