How to pop from cloned route to parent.

Version
Tell us which versions you are using:

react-native-router-flux v3.32.0
react-native v0.29.0

Expected behaviour
Routes set up like this:
<Scene clone key="composer" component={Composer} hideNavBar hideTabBar />

<Scene
  key="myAccount"
  initial
  tabs
  hideNavBar
  hideTabBar={false}
  tabBarStyle={styles.tabBar}
  tabBarIconContainerStyle={styles.tabBarIconStyle}
  type={ActionConst.REPLACE}
>
  <Scene key="dashboard" component={Dashboard} tabTitle="Dashboard" initial icon={TabIcon} hideNavBar hideTabBar={false} />
  <Scene key="myStreamContainer" tabTitle="Stream" icon={TabIcon} hideNavBar hideTabBar={false}>
    <Scene key="myStream" component={Stream} hideNavBar hideTabBar={false} />
    {/* <Scene key="myComposer" component={Composer} hideNavBar hideTabBar />*/}
  </Scene>
  <Scene key="recorder" tabTitle="Record" icon={TabIcon} hideNavBar hideTabBar={false} >
    <Scene key="activityChooserView" component={ActivityChooserView} hideTabBar={false} initial hideNavBar />
    <Scene key="recorderView" component={Recorder} title="recorder" hideTabBar hideNavBar unmountScenes />
    <Scene key="userResponseView" component={UserResponseView} title="Response" hideTabBar hideNavBar unmountScenes />
  </Scene>
</Scene>

<Scene
  key="traineeAccount"
  tabs
  hideNavBar
  tabBarStyle={styles.tabBar}
  tabBarIconContainerStyle={styles.tabBarIconStyle}
  type={ActionConst.REPLACE}
>
  <Scene key="traineeStreamContainer" tabTitle="Stream" icon={TabIcon} hideNavBar hideTabBar={false}>
    <Scene key="traineeStream" component={Stream} hideNavBar hideTabBar={false} type={ActionConst.PUSH} />
    {/* <Scene key="traineeComposer" component={Composer} hideNavBar hideTabBar type={ActionConst.PUSH} />*/}
  </Scene>
</Scene>

I want to be able to push the composer into the stack from within either myAccount > myStreamContainer or from within traineeAccount > traineeStreamContainer. I will push from within either myStream or traineeStream. I call Actions.pop() from within Composer, and want to return to either myStream or traineeStream.
Actual behaviour
I call Actions.pop() and nothing happens from within Composer.
Steps to reproduce
From within myStream: Actions.composer({type:ActionConst.PUSH}). From within the following Composer: Actions.pop()

FYI all of these scenes are wrapped in a Switch to determine which of traineeAccount and myAccount will be displayed. I don't know if that is influencing this, or if there is a better way to show scenes with differing tabs...

I know @joenoon was working on something related to this. Maybe he has an idea of the problem I am facing?

@kristojorg this sounds to me like it should work as you expect.  I'm on the road now but will be back to check this in more detail in about 24h.  One thought in case you want to experiment:  You mentioned this is all wrapped in a Switch.  You might need to move that clone scene "up" - directly inside the root scene.  They should be defined as early as possible.

@kristojorg I reviewed my app and do something very similar to what you described, and it works fine.  I think the issue is what I mentioned before with the clone scenes needing to be defined directly inside the root scene.  If that still doesn't work, I have one other idea that you could test that modifies Switch, but lets not go there unless we have to because its a bit of a hack.  Let me know.

Hi @joenoon thanks so much for the feedback here. Really appreciate it.
I tried moving the Scene directly inside my top level Switch, but am still seeing the same behavior. I can push it into the stack from within a nested scene lower down, but calling Actions.pop() isn't triggering anything.
It would be helpful to debug this if I could see the actual navigation stack. I use Redux, is there a way to plug your reducer and implementation into my store so that I can see the state in my devtools / logger?
Thanks again!

@joenoon I found an issue that describes how to user createReducer to connect with Redux. Hopefully this will let me see the internal navigationState as it changes and debug this. Right now I just am subscribed to RNRF Actions, which is useful but doesn't allow me to see the actual navigationState.
Let me know if you think of anything else that might be causing this. It's getting pretty tough to workaround! Thanks!

@kristojorg can you import this Switch instead of the Switch that comes with rnrf?
import { Actions, DefaultRenderer } from 'react-native-router-flux';

import React, { Component, PropTypes } from 'react';

export let Switch = class extends Component {

  static propTypes = {
    onNavigate: PropTypes.func,
  };

  constructor(props,context) {
    super(props,context);
    this.updateState = this.updateState.bind(this);
    this.state = {};
  }

  componentDidMount() {
    this.updateState(this.props);
  }

  componentWillReceiveProps(props) {
    this.updateState(props);
  }

  updateState(props) {
    const navState = props.navigationState;

    const selector = props.selector;
    if (!selector) console.error('Selector should be defined.');

    const selectedKey = selector(props);
    if (!selectedKey) console.error('Selector should return key.');

    const selected = navState.children.filter(el => el.sceneKey === selectedKey);
    if (!selected) console.error(`A scene for key “${selectedKey}” does not exist.`);

    const navigationState = selected[0];
    if (!navigationState) console.error(`Cannot find a scene with key “${selectedKey}”`);

    if (navigationState.key !== navState.children[navState.index].key) {
      Actions[selectedKey]();
    }

    this.setState({ navigationState });
  }

  render() {
    if (this.state.navigationState) {
      return (
        <DefaultRenderer
          onNavigate={this.props.onNavigate}
          navigationState={this.state.navigationState}
        />
      );
    }

    return null;
  }
};

That is basically an older version of the Switch component that I still use, because for some reason the one that now comes with rnrf doesn't work for me.  I wonder if we have the same issue.
Just import this Switch i.e. import {Switch} from './mySwitch'; instead of the one from react-native-router-flux.  Look forward to hearing if that solves your issue.

I just tried importing that Switch and it didn't seem to solve the issue. I can confirm that I'm seeing a BACK ACTION when I pop the route, but nothing else happens... :(
For reference, here is my entire router component. You will see I have started defining new scenes for the same screen in many places since clone isn't working for me. This is getting more and more complex, and the current scene I'm trying to clone is key="activity" there near the top after the first switch.

const RouterWithRedux = connect()(Router);

class Root extends React.Component {

  isLoggedIn(props) {
    const token = props.me.get('token');
    const myId = props.me.get('myId');
    const gu = props.route.get('gu');
    const guid = props.route.get('guid');
    const rehydrated = props.route.get('rehydrated');

    if (!rehydrated) return 'splash';

    if (token && token !== '' && token !== constants.FETCHING) {
      if (gu && guid && myId) {
        return 'drawer';
      }
      return 'login';
    }
    return 'login';
  }

  tabSceneSelector(props) {
    const myId = props.me.get('myId');
    const gu = props.route.get('gu');
    const guid = props.route.get('guid');

    if (gu === 'user') {
      if (guid === myId) {
        return 'myAccount';
      }
      if (!_.isNil(guid)) return 'traineeAccount';
    }
    if (gu === 'group') return 'groupAccount';
    return 'splash';
  }

  render() {
    return (
      <RouterWithRedux >
        <Scene
          key="root"
          // component={connect(state => state.get('me').toJS())(Switch)}
          component={connect(state => ({
            route: state.get('router'),
            me: state.get('me'),
          }))(Switch)}
          tabs
          unmountScenes
          type={ActionConst.REPLACE}
          selector={props => this.isLoggedIn(props)}
        >
          <Scene key="activity" clone component={Activity} hideNavBar hideTabBar type={ActionConst.PUSH} />

          <Scene key="login" component={Login} title="Login" passProps hideNavBar />
          <Scene key="splash" component={Splash} title="Splash" hideNavBar hideTabBar />
          <Scene key="drawer" component={Drawer} open={false} >
            <Scene
              key="tabSwitch"
              component={connect(state => ({
                route: state.get('router'),
                me: state.get('me'),
              }))(Switch)}
              tabs
              unmountScenes
              selector={props => this.tabSceneSelector(props)}
              type={ActionConst.RESET}
            >
              <Scene
                key="myAccount"
                tabs
                hideNavBar
                hideTabBar={false}
                tabBarStyle={styles.tabBar}
                tabBarIconContainerStyle={styles.tabBarIconStyle}
                type={ActionConst.RESET}
              >
                <Scene key="dashboard" component={Dashboard} tabTitle="Dashboard" initial icon={TabIcon} hideNavBar hideTabBar={false} />
                <Scene key="myStreamContainer" tabTitle="Stream" icon={TabIcon} hideNavBar hideTabBar={false}>
                  <Scene key="myStream" component={Stream} hideNavBar hideTabBar={false} />
                  <Scene key="myComposer" component={Composer} hideNavBar hideTabBar type={ActionConst.PUSH} />
                </Scene>
                <Scene key="myCalendarContainer" tabTitle="Calendar" icon={TabIcon} hideNavBar hideTabBar={false} >
                  <Scene key="myCalendar" component={Calendar} hideNavBar hideTabBar={false} />
                  <Scene key="myActivity" component={Activity} hideNavBar hideTabBar type={ActionConst.PUSH} />
                  <Scene key="actUserResponse" component={UserResponseView} title="Response" hideTabBar hideNavBar unmountScenes />
                </Scene>
                <Scene key="recorder" tabTitle="Record" icon={TabIcon} hideNavBar hideTabBar={false} >
                  <Scene key="activityChooserView" component={ActivityChooserView} hideTabBar={false} initial hideNavBar />
                  <Scene key="recorderView" component={Recorder} title="recorder" hideTabBar hideNavBar unmountScenes />
                  <Scene key="userResponseView" component={UserResponseView} title="Response" hideTabBar hideNavBar unmountScenes />
                </Scene>
              </Scene>

              <Scene
                key="traineeAccount"
                tabs
                hideNavBar
                tabBarStyle={styles.tabBar}
                tabBarIconContainerStyle={styles.tabBarIconStyle}
                type={ActionConst.REPLACE}
              >
                <Scene key="traineeStreamContainer" tabTitle="Stream" icon={TabIcon} hideNavBar hideTabBar={false}>
                  <Scene key="traineeStream" component={Stream} hideNavBar hideTabBar={false} type={ActionConst.PUSH} />
                  <Scene key="traineeComposer" component={Composer} hideNavBar hideTabBar type={ActionConst.PUSH} />
                </Scene>
                <Scene key="traineeCalendar" component={Calendar} tabTitle="Calendar" icon={TabIcon} hideNavBar hideTabBar={false} />

              </Scene>

              <Scene
                key="groupAccount"
                tabs
                hideNavBar
                tabBarStyle={styles.tabBar}
                tabBarIconContainerStyle={styles.tabBarIconStyle}
                type={ActionConst.REPLACE}
              >
                <Scene key="groupStreamContainer" tabTitle="Stream" icon={TabIcon} hideNavBar hideTabBar={false}>
                  <Scene key="groupStream" component={Stream} hideNavBar hideTabBar={false} type={ActionConst.PUSH} />
                  <Scene key="groupComposer" component={Composer} hideNavBar hideTabBar type={ActionConst.PUSH} />
                </Scene>
                <Scene key="groupCalendar" component={Calendar} tabTitle="Calendar" icon={TabIcon} hideNavBar hideTabBar={false} />
              </Scene>

            </Scene>
          </Scene>
        </Scene>
      </RouterWithRedux>
    );
  }
}

function mapStateToProps(state) {
  return {
    // userName: selectors.getMyName(state),
    route: selectors.getRoute(state),
    myId: selectors.getMyId(state),
  };
}

const RootContainer = connect(
  mapStateToProps,
  // mapDispatchToProps
)(Root);

export default Root;

I took a shot at making some modifications:
const RouterWithRedux = connect()(Router);

function isLoggedIn (props) {
  const token = props.me.get('token');
  const myId = props.me.get('myId');
  const gu = props.route.get('gu');
  const guid = props.route.get('guid');
  const rehydrated = props.route.get('rehydrated');

  if (!rehydrated) return 'splash';

  if (token && token !== '' && token !== constants.FETCHING) {
    if (gu && guid && myId) {
      return 'drawer';
    }
    return 'login';
  }
  return 'login';
}

function tabSceneSelector (props) {
  const myId = props.me.get('myId');
  const gu = props.route.get('gu');
  const guid = props.route.get('guid');

  if (gu === 'user') {
    if (guid === myId) {
      return 'myAccount';
    }
    if (!_.isNil(guid)) return 'traineeAccount';
  }
  if (gu === 'group') return 'groupAccount';
  return 'splash';
}

const scenes = Actions.create(
  <Scene key="root" hideNavBar hideTabBar>
    <Scene key="activity" clone component={Activity} hideNavBar hideTabBar type={ActionConst.PUSH} />
    <Scene
      key="switcher"
      // component={connect(state => state.get('me').toJS())(Switch)}
      component={connect(state => ({
        route: state.get('router'),
        me: state.get('me'),
      }))(Switch)}
      tabs
      initial
      unmountScenes
      type={ActionConst.REPLACE}
      selector={props => isLoggedIn(props)}
    >
      <Scene key="login" component={Login} title="Login" passProps hideNavBar />
      <Scene key="splash" component={Splash} title="Splash" hideNavBar hideTabBar />
      <Scene key="drawer" component={Drawer} open={false}>
        <Scene
          key="tabSwitch"
          component={connect(state => ({
            route: state.get('router'),
            me: state.get('me'),
          }))(Switch)}
          tabs
          unmountScenes
          selector={props => tabSceneSelector(props)}
          type={ActionConst.RESET}
        >
          <Scene
            key="myAccount"
            tabs
            hideNavBar
            hideTabBar={false}
            tabBarStyle={styles.tabBar}
            tabBarIconContainerStyle={styles.tabBarIconStyle}
            type={ActionConst.RESET}
          >
            <Scene key="dashboard" component={Dashboard} tabTitle="Dashboard" initial icon={TabIcon} hideNavBar hideTabBar={false} />
            <Scene key="myStreamContainer" tabTitle="Stream" icon={TabIcon} hideNavBar hideTabBar={false}>
              <Scene key="myStream" component={Stream} hideNavBar hideTabBar={false} />
              <Scene key="myComposer" component={Composer} hideNavBar hideTabBar type={ActionConst.PUSH} />
            </Scene>
            <Scene key="myCalendarContainer" tabTitle="Calendar" icon={TabIcon} hideNavBar hideTabBar={false} >
              <Scene key="myCalendar" component={Calendar} hideNavBar hideTabBar={false} />
              <Scene key="myActivity" component={Activity} hideNavBar hideTabBar type={ActionConst.PUSH} />
              <Scene key="actUserResponse" component={UserResponseView} title="Response" hideTabBar hideNavBar unmountScenes />
            </Scene>
            <Scene key="recorder" tabTitle="Record" icon={TabIcon} hideNavBar hideTabBar={false} >
              <Scene key="activityChooserView" component={ActivityChooserView} hideTabBar={false} initial hideNavBar />
              <Scene key="recorderView" component={Recorder} title="recorder" hideTabBar hideNavBar unmountScenes />
              <Scene key="userResponseView" component={UserResponseView} title="Response" hideTabBar hideNavBar unmountScenes />
            </Scene>
          </Scene>

          <Scene
            key="traineeAccount"
            tabs
            hideNavBar
            tabBarStyle={styles.tabBar}
            tabBarIconContainerStyle={styles.tabBarIconStyle}
            type={ActionConst.REPLACE}
          >
            <Scene key="traineeStreamContainer" tabTitle="Stream" icon={TabIcon} hideNavBar hideTabBar={false}>
              <Scene key="traineeStream" component={Stream} hideNavBar hideTabBar={false} type={ActionConst.PUSH} />
              <Scene key="traineeComposer" component={Composer} hideNavBar hideTabBar type={ActionConst.PUSH} />
            </Scene>
            <Scene key="traineeCalendar" component={Calendar} tabTitle="Calendar" icon={TabIcon} hideNavBar hideTabBar={false} />

          </Scene>

          <Scene
            key="groupAccount"
            tabs
            hideNavBar
            tabBarStyle={styles.tabBar}
            tabBarIconContainerStyle={styles.tabBarIconStyle}
            type={ActionConst.REPLACE}
          >
            <Scene key="groupStreamContainer" tabTitle="Stream" icon={TabIcon} hideNavBar hideTabBar={false}>
              <Scene key="groupStream" component={Stream} hideNavBar hideTabBar={false} type={ActionConst.PUSH} />
              <Scene key="groupComposer" component={Composer} hideNavBar hideTabBar type={ActionConst.PUSH} />
            </Scene>
            <Scene key="groupCalendar" component={Calendar} tabTitle="Calendar" icon={TabIcon} hideNavBar hideTabBar={false} />
          </Scene>

        </Scene>
      </Scene>
    </Scene>
  </Scene>
);

class Root extends React.Component {

  render() {
    return <RouterWithRedux scenes={scenes} />;
  }
}

function mapStateToProps(state) {
  return {
    // userName: selectors.getMyName(state),
    route: selectors.getRoute(state),
    myId: selectors.getMyId(state),
  };
}

const RootContainer = connect(
  mapStateToProps,
  // mapDispatchToProps
)(Root);

export default Root;

Added a base "root" scene, and made the "activity" clone scene a direct child. Made "switcher" initial.
Moved scene creation into Actions.create to ensure they only get created once.
I'm not too sure about the need for type={ActionConst...} in so many places.  I dont have any type= in my scenes so I would think you probably just want the defaults, unless you know you have to set them explicitly for your use case.

THANK YOU SO MUCH!! It worked!
This was really quite kind of you. I now see that the problem was not declaring it high enough... when I tried it at the root earlier it kept rendering initially - and obviously I should have added initial to my switcher.
Thanks for the advice on the type props. I have been sort of passively debugging performance problems and tried that in a few places but never took them out. My app gets very slow as you use it. I think it must have to do with my redux selectors being expensive, or with not unmounting scenes when they are navigated away from. My battle plan there is

Memoize redux selectors.
Add shouldComponentUpdate short-circuits to scenes
Try adding requestAnimationFrames to delay js work until after animations (especially drawer open/close).

If you have any experience with performance and have any suggestions what to look at I would appreciate the advice! I tried getting react-addons-perf to work so I could measure selector cost but it didn't seem to do much. Anyways, just thought I'd ask if you have any experience there.
Thank you again, owe you one.

It seems I'm having a related issue now, however. Trying to push from one cloned scene to another cloned scene. The second scene renders according to my logs but is never actually displayed.... Any thoughts? I tried importing your Switch again but it wasn't that. Should I open a new issue?

Could you submit PR for it? Any other custom code you use?

On 31 Jul 2016, at 19:44, Joe Noon<EMAIL_ADDRESS>wrote:
@kristojorg https://github.com/kristojorg can you import this Switch instead of the Switch that comes with rnrf?
import { Actions, DefaultRenderer } from 'react-native-router-flux';
import React, { Component, PropTypes } from 'react';
export let Switch = class extends Component {
static propTypes = {
onNavigate: PropTypes.func,
};
constructor(props,context) {
super(props,context);
this.updateState = this.updateState.bind(this);
this.state = {};
}
componentDidMount() {
this.updateState(this.props);
}
componentWillReceiveProps(props) {
this.updateState(props);
}
updateState(props) {
const navState = props.navigationState;
const selector = props.selector;
if (!selector) console.error('Selector should be defined.');

const selectedKey = selector(props);
if (!selectedKey) console.error('Selector should return key.');

const selected = navState.children.filter(el => el.sceneKey === selectedKey);
if (!selected) console.error(`A scene for key “${selectedKey}” does not exist.`);

const navigationState = selected[0];
if (!navigationState) console.error(`Cannot find a scene with key “${selectedKey}”`);

if (navigationState.key !== navState.children[navState.index].key) {
  Actions[selectedKey]();
}

this.setState({ navigationState });

}
render() {
if (this.state.navigationState) {
return (

);
}
return null;

}
};
That is basically an older version of the Switch component that I still use, because for some reason the one that now comes with rnrf doesn't work for me. I wonder if we have the same issue.
Just import this Switch i.e. import {Switch} from './mySwitch'; instead of the one from react-native-router-flux. Look forward to hearing if that solves your issue.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/aksonov/react-native-router-flux/issues/976#issuecomment-236444982, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQpcXH7NHMBzlgK1mTDTSIzwk1ttj_Bks5qbN71gaJpZM4JVs92.

Could you submit PR for it? Any other custom code you use?

@aksonov that old Switch is the only custom code I use on top of 3.31.  I tried to figure it out once but never solved it.
From memory:  On initial app load with a typical logged in / logged out Switch scene setup, my app would be on the "home" screen.  I would then try to push a clone scene, and nothing would appear to happen.
The farthest I tracked it down to was:  the state that was being seen by the failing push action was not correct (maybe wrong indexes and/or parent).
If I switch tabs first, THEN push my clone scene, it works fine.  This makes me think I'm landing in a corrupt state, but by clicking a tab the reducer runs again the state is somehow corrected.
So I started looking into Switch for changes.  What stuck out to me was it used to call Actions[key](), and now it doesn't.  So my best guess was to just use the old Switch in my app, and that solved my issue.
I tried to figure out why state was incorrect on landing but correct after switching tabs back and forth, and never found a fix.  I was thinking this was only related to clone scenes but its possibly other scenarios too.
ref https://github.com/aksonov/react-native-router-flux/issues/952

Let's revert to old Switch. I thought calling Actions[key] was redundant and slows things down (and such version works well for me), but it (new version) seems don't work for some people.

I can create a PR for the old-style Switch, but the current one has some stuff in there that would be lost:

the non-selector statem way
unmountScenes

I've never used either of those so I'd need to figure out how they work if they need to be migrated back into Switch.
Are both of those necessary going forward?

statem is moved to mobx, so it is not need (it is not documented anyway), but unmountScenes looks very useful, so we need to merge it...

Ok ill take a look now

I figured out my question regarding pushing a second cloned route. Thanks for your help with all this.
I do have a question about cloning tabs however. In the snippet below, I would like to not have to redeclare the nested Scenes within the tabs, but I have to declare something inside of them so the tab knows what to render initially.
You can see in this snippet that I have one tab which is only displayed in the myAccount scene (the key="dashboard" tab).  I can then push my cloned routes into those tabs, but I can't clone an entire tab because there is no way to define the initial scene for it.
<Scene key="root">
  <Scene key="activity" clone component={Activity} />
  <Scene key="userResponse" clone component={UserResponse} />
  <Scene key="composer" clone component={Composer} />

  <Scene
    key="tabSwitch"
    component={connect(state => ({
      route: state.get('router'),
      me: state.get('me'),
    }))(Switch)}
    tabs
    initial
    selector={properties => this.tabSceneSelector(properties)}
  >

    <Scene key="myAccount" tabs >
      <Scene key="dashboard" component={Dashboard} />
      <Scene key="myStreamContainer" icon={TabIcon} >
        <Scene key="traineeStream" component={Stream} />
      </Scene>
      <Scene key="myCalendarContainer" component={Calendar} icon={TabIcon} >
        <Scene key="myCalendar" component={Calendar} />
      </Scene>
    </Scene>

    <Scene key="traineeAccount" tabs >
      <Scene key="traineeStreamContainer" icon={TabIcon} >
        <Scene key="traineeStream" component={Stream} />
      </Scene>
      <Scene key="traineeCalendarContainer" component={Calendar} icon={TabIcon} >
        <Scene key="traineeCalendar" component={Calendar} />
      </Scene>
    </Scene>

  </Scene>
</Scene>

My solution to this would be one of two approaches:

A mechanism to show/hide tab scenes based on some redux state (instead of Switch, which requires me to redefine each tab scene for each case)

A mechanism to declare cloned scene groups outside of the Root and then use them within Root... that would look something like:

const ClonedStreamTab = (
  <Scene key="streamContainer" icon={TabIcon} >
    <Scene key="Stream" component={Stream} />
  </Scene>
);

const ClonedCalendarTab =(
  <Scene key="calendarContainer" component={Calendar} icon={TabIcon} >
    <Scene key="calendar" component={Calendar} />
  </Scene>
);

<Scene key="root">
  <Scene key="activity" clone component={Activity} />
  <Scene key="userResponse" clone component={UserResponse} />
  <Scene key="composer" clone component={Composer} />

  <Scene
    key="tabSwitch"
    component={connect(state => ({
      route: state.get('router'),
      me: state.get('me'),
    }))(Switch)}
    tabs
    initial
    selector={properties => this.tabSceneSelector(properties)}
  >

    <Scene key="myAccount" tabs >
      <Scene key="dashboard" component={Dashboard} />
      <ClonedStreamTab />
      <ClonedCalendarTab />
    </Scene>

    <Scene key="traineeAccount" tabs >
      <ClonedStreamTab />
      <ClonedCalendarTab />
    </Scene>

  </Scene>
</Scene>

Am curious to hear your thoughts about the best way to handle this type of logic/nesting.


[enhance]if it's possible to support css classnames

Hi again~
Currently using the name of a component can actually also select the element, like div[data-lf-field-name="ele_name"]
But if many items share the same CSS style, this kind of rules will be a little redundant. (Or in some cases, if the name is generated in runtime, it will be harder to select the element in CSS)
With CSS classname support, both the CSS selectors and CSS rules can be simplified significantly.
So may I ask, if the CSS classname can be supported for these form components?
Thanks!

Hi, you mean having a class name prop like
<div
  className="lf-control-text-field lf-name-<field name>"
  data-lf-field-name="<field name>"
</div>

?

Ah ok, now I got it.
Yes it makes sense, I’ll implement it.
Thanks for the feedback
Il 24 dic 2024, 02:09 +0100, ghoshorn @.***>, ha scritto:

Hi, feel like lets-form is really useful for its JSON schema mode, since it can create form dynamically. With CSS classname support, it can be more powerful since we can apply extra styles for it.
Like
{
"component": "toggle",
"label": "My toggle",
"name": "my_toggle",
"hint": "Select yes or no",
"classname": "custom-classname-1"
}
In your example maybe someone else also like it, but I personally really prefer your JSON schema ;-)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>


characters are replaced with "_"

Please add a note to the section below to clarify that when using directory sync, any characters other than "-" is replaced with "_"
・mailNickname (Exchange alias)
　　　The attribute value cannot begin with a period (.).
　　　The attribute value must be unique within the directory.
This note is needed, as the docs below indicate that EXO allows characters in "alias," and also allowed for cloud users.
https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/set-mailbox?view=exchange-ps
-Alias
The Alias parameter specifies the Exchange alias (also known as the mail nickname) for the recipient. This value identifies the recipient as a mail-enabled object, and shouldn't be confused with multiple email addresses for the same recipient (also known as proxy addresses). A recipient can have only one Alias value.
The value of Alias can contain letters, numbers and the characters !, #, $, %, &, ', *, +, -, /, =, ?, ^, _, `, {, |, } and ~. Periods (.) are allowed, but each period must be surrounded by other valid characters (for example, help.desk). Unicode characters from U+00A1 to U+00FF are also allowed. The maximum length of the Alias value is 64 characters.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: c60ee789-fce6-6c95-150d-be4ae895730e
Version Independent ID: d9e96954-3b85-bf8d-c7d3-916a4698fd77
Content: Prepare for directory synchronization to Office 365
Content Source: Enterprise/prepare-for-directory-synchronization.md
Service: o365-administration
GitHub Login: @JoeDavies-MSFT
Microsoft Alias: josephd

@UKayo  - Thank you for submitting feedback.
I will get this issue over to the Enterprise writing team for investigation.
Thank you for reporting and making the docs better. Much appreciated.
I made a note to request the team to update this when the work is complete.

@UKayo I have looked into this and don't see the connection between your request and the EXO article and reference you describe above. Where does it say that any characters other than "-" are replaced with "_"? Can you clarify? Thanks.

@UKayo - We would like to follow up. Can you please respond to the query of JoeDavies-MSFT?
Thank you.

@UKayo I added a note to the https://docs.microsoft.com/en-us/office365/enterprise/prepare-for-directory-synchronization topic in the mailNickname (Exchange alias) section about underscores added to converted names. Thanks for letting us know.


Question about the GPU and the training time

Hi! I wonder what kind of GPU do you use in the experiment and how long does it take for one group of experiment? Thanks!

Four 3090 GPUs, one experiment takes three days.


Implementation of timestamp

As I see, the timestamp() has not been implemented as of yet. Putting this issue out there so devs out there can contribute to this issue.

Thanks for pointing out. I will fix this with next release.


feat: Enable support to specify database version

Provide support to specify database version. Currently default value has been set to "POSTGRES_14". Please check out our documentation for more details.

@rajc242 thanks for the PR. Can you plz update version.tf file with >5.13?

/gcbrun

/gcbrun


Default Dremio JDBC driver Update

Description
The current default Dremio JDBC driver URL points to
https://download.dremio.com/jdbc-driver/3.0.6-201812082352540436-1f684f9/dremio-jdbc-driver-3.0.6-201812082352540436-1f684f9.jar
but this is very old 4 or 5 years) and lots of things break with the newer versions of Dremio.
Can you please update the link that downloads the default driver for Dremio to something like the v24 driver?
E.g.
https://download.dremio.com/jdbc-driver/24.0.0-202302100528110223-3a169b7c/dremio-jdbc-driver-24.0.0-202302100528110223-3a169b7c.jar
DBeaver Version
Community <IP_ADDRESS>301211053
Operating System
Linux
Database and driver
As above
DB : Dremio
Driver : Default should be change to
https://download.dremio.com/jdbc-driver/24.0.0-202302100528110223-3a169b7c/dremio-jdbc-driver-24.0.0-202302100528110223-3a169b7c
Steps to reproduce

Create new connection to Dremio
Click "Driver Properties" tab
"Driver Settings" pop up pops up.

Note the URL for "Files required by the driver : "
Observed behaviour:
URL is :
https://download.dremio.com/jdbc-driver/3.0.6-201812082352540436-1f684f9/dremio-jdbc-driver-3.0.6-201812082352540436-1f684f9.jar
Expected behaviour:
URL is
https://download.dremio.com/jdbc-driver/24.0.0-202302100528110223-3a169b7c/dremio-jdbc-driver-24.0.0-202302100528110223-3a169b7c.j
Additional context
Note this is not the same as changing to Arrow flight driver as per 15535

Thanks for the idea @AndyHunt66

Can you please check - does this driver version
https://download.dremio.com/jdbc-driver/24.0.0-202302100528110223-3a169b7c/dremio-jdbc-driver-24.0.0-202302100528110223-3a169b7c.jar
works fine for you in the latest DBeaver version?
We do not have a Dremio database environment to check from our side.

Yep - I can confirm that that driver works just fine with DBeaver <IP_ADDRESS>302171528 and Dremio 24.0.0


Continue improve contracts test cases

Add Consensus.DPoS contract view method tests.
Add TokenConverter contract test project, cases will added tomorrow.
Comment MultiToken contract 'ForTests' methods.

:white_check_mark: Build AElf <IP_ADDRESS>8 completed (commit https://github.com/AElfProject/AElf/commit/29adbf0624 by @EricBlack)

:white_check_mark: Build AElf <IP_ADDRESS>1 completed (commit https://github.com/AElfProject/AElf/commit/81b10ba0d6 by @EricBlack)


V 3/wui list select

Changes

feat: Add wui-list-select component

Fallback logic added
Disabled state added


Check to see if the .NET 6.0 SDK is Installed When Launching Stride

PR Details
Stride 4.1 requires the .NET 6.0 SDK. The existing FindAndSetMSBuildVersion() method will only check to see if .NET Framework or .NET SDK are present, this can be bypassed if an older version of the SDK is installed (i.e., 5.0).
After bypassing this prerequisite check, Stride will function normally until the user attempts to build their project.

Description

The Startup() method in Stride.GameStudio\Program.cs will check to see if the .NET 6.0 SDK is installed when the user opens Stride 4.1.x. If the SDK is missing the user is prompted to install it, the detected SDK version is provided to help with troubleshooting.
Related Issue

Prompted by discussion in issue https://github.com/stride3d/stride/issues/1753
Types of changes

[ ] Docs change / refactoring / dependency upgrade
[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My change requires a change to the documentation.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Given the fact that we'll be upgrading to .Net 8 shortly, we'll have to remember to change this scope as well. How about we future proof it. Checking for an available SDK of the .net version the game studio is built in instead of an explicit one ?

That's a good idea! Is there a way to programmatically check which version of .net an application was built with?

Well, I thought that your RuntimeInformation.FrameworkDescription did, but that seems to only report the version of the runtime, not SDK. So I'm not sure that this PR would even work if the user had an older SDK, or no SDK. Just having the runtime installed is enough to bypass the check afaik.

Hmm, the .NET SDK now includes the Runtime so that shouldn't be an issue moving forward, but I wasn't thinking of the Runtime as a standalone install. I guess we need some additional checks. 🤔

I was thinking FindAndSetMSBuildVersion() is deprecated now that only the .NET SDK is supported but we can simply raise x.Version.Major value here for a similar result,
https://github.com/stride3d/stride/blob/c6fd21b1bc974fd3fed0f6089df31bb356b3e574/sources/assets/Stride.Core.Assets/PackageSessionPublicHelper.cs#L41C58-L41C58
I'll update the PR if there are no objections, this method still relies on RuntimeInformation.FrameworkDescription so @Eideren's point is valid.

So, checking that version against Environment.Version then ?

So, checking that version against Environment.Version then ?

From my tests so far I think we can leave it as is because x.Version.Major needs to be updated manually regardless. We also need an exact version match with whatever that version is.

Updated PR and post.
Now that the .NET SDK includes the Runtime I think this will still help many users avoid issues with out of date SDKs moving forward (and I assume x.Version.Major was meant to remain current anyway).

Thanks !


CI Test Check for Style guidelines using Spotless plugin

Description:
Add a CI Test that checks that the spotless check passes, otherwise it will fail and recommend to run the following command:
./gradlew spotlessApply

Related issue(s):
Fixes #31
Notes for reviewer:
Raised another PR with the same exact changes, but added another commit with a modification of style so to force the failure of the check.
see here:
https://github.com/hashgraph/hedera-block-node/pull/42
Checklist

[ ] Documented (Code comments, README, etc.)
[x] Tested (unit, integration, etc.)

It might be worth taking a look at services compile checks, particularly the CGroups setup, to see if we can improve this by using their action code/setup as a model.  We might also want to include module checks (from the same reference), as a way to ensure the module setup remains clean and consistent.

It might be worth taking a look at services compile checks, particularly the CGroups setup, to see if we can improve this by using their action code/setup as a model. We might also want to include module checks (from the same reference), as a way to ensure the module setup remains clean and consistent.

Yes. I did take a look at the services, and that specific workflow as a source of inspiration, however implementing everything in there is probably not necessary right now and out of scope of current task.
But I agree that as the Codebase grows and in time, when we have many CI jobs we can use that model and refactor them all into a single CI WF.
But for now, the objective of this CI Test is to protect the style guidelines.


feat: cluster scopes add hostname regexes for client matchs cluster by hostname

Description

Related Issue

Motivation and Context

Screenshots (if appropriate)
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation Update (if none of the other choices apply)

Checklist

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.

@yxxhero


Updated Hello-World.py

Removed the space between "world" and "!" and capitalized the letter "w"

Removed the space between "world" and "!" and capitalized the letter "w"

Removed the space between "world" and "!" and capitalized the letter "w"


Upload Electroencephalogram (EEG) emotion recognition (EER) model

Electroencephalogram (EEG) is a kind of brain signal

Done.


Add xontrib and xonsh topics to the repo about settings

Thanks!

@gforsyth could you check this https://github.com/xonsh/xontrib-ptk-shell#xontrib-promotion-read-and-remove-this-section ?
having a PYPI token would help publish on new releases

@gforsyth I think this repo can be archived or deleted. I will create a sub-package for ptk-shell inside the xonsh as mono-repo https://github.com/xonsh/xonsh/pull/4862#issuecomment-1184639183


Malformed class hash in error message

A user on Discord has reported (link to thread) an issue with using starknet-devnet-rs, but what caught my eye was the format of the error:

This is probably happening because we catch starknet_in_rust errors and just do:
Err(err) => Err(ApiError::ContractError { msg: err.to_string() }),

The user's problem is probably that the class hasn't been declared, so this issue isn't concerned with that.
Perhaps we could do something smarter to display the error (i.e. the class hash) better. Or perhaps this can be fixed on starknet_in_rust side.

#193 fixes it


better home screen

The home screen has information about jhipster, we should remove it and make it look more like a professional app.

[ ] Find a new image to replace the jhipster
[ ] Write a welcoming description about the app
[ ] point to links of the login, dashboard, etc, etc, etc

this is related to #34, but this is more about content while #34 is more about style and look and feel

I think it is related to #34 and #44 that was closed by @DavydBR.
Close it if you are OK.

Yes, I think that the issues #34,#35 and #44 are related. I've made the changes, attached screenshots of the links that still had to make.


chore: remove playwright

:tada: This PR is included in version 1.5.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Lowering resources for test vtcombo.

@enisoc part of the google3 CL already.

Merging this so import will work as expected.

LGTM


getOptions function added to field  class

Hello!
Could you please merge this PR ASAP and deploy to packagist.org?


Option that treat each js file as module

Suggestion
Add option "typeJs": "module" (default could be "typeJs": "script")
🔍 Search Terms
How to say TypeScript that each js file is a module ?
How treat in TypeScript each js file as module ?
✅ Viability Checklist
My suggestion meets these guidelines:

[X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[X] This wouldn't change the runtime behavior of existing JavaScript code
[X] This could be implemented without emitting different JS based on the types of the expressions
[X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[X] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion
Add option "typeJs": "module" (default could be "typeJs": "script")
📃 Motivating Example
In NodeJs we have ability to say which module system we use by setting "type": "module" in package.json
But when I add allowJs option TypeScript compiler treat each js file as plain script and it complains about redeclaration of the same function.
It would be nice instead of renaming each js -> mjs or adding stub export {}; statement to treat each js file as module, to add option, the same way node did
💻 Use Cases
It is needed in case for example where in project bunch of scratches js files with some code that do not import or export something at this moment

See #14279


LABS: Remove reaction and edits settings

They should be enabled by default.

Kamino cloned this issue to vector-im/riot-web


Private key issues

Sorry about the non-descriptive issue title...
If I enter my repo (Le09/le09.github.io) on the main page, https://giscuss.vercel.app/, I get the following error:
error	"error:0909006C:PEM routines:get_name:no start line"
And so I get "Cannot use giscus on this repository. Make sure all of the above criteria has been met."
The 3 criteria have been met; in fact the app is properly running!
(example https://woolion.art/2022/12/08/WOB.html, although I pushed a new commit to use my own instance since it now works)
However, to complete the script data I had to use the gh CLI to get the category id.
Now on the self-hosted version, I got the issue:
error	"secretOrPrivateKey must be an asymmetric key when using RS256"
which was really my mistake: because of
https://github.com/giscus/giscus/blob/d99a6e611685294adfd76220c50b666f9221ab23/.env.example#LL6C28-L6C28
ENTER-KEY-HERE-WITHOUT-LINE-BREAKS, I removed line-breaks from the .pem file content, which was the problem.
So I would maybe update that file to remove the possibility of confusion, or maybe add a troubleshooting section regarding that.
I got both ways working so this is more to remove friction for other users who might encounter the same issues; I've looked at issue #334, #491 and #921 without finding precise answers.
And much thanks for this project, it looks very nice :-)

Thanks!


Only retain signed data for active dAPIs

Currently, we do not store active dAPIs in state which means that we need to store the signed data for every beacon even if there are only a few active beacons among the active dAPIs.
Another side effect of this is that once we fetch a data for a beacon, we persist it forever.

We store dapiNames received from the contract in the state, so the signed data fetch loop can just filter incoming samples by active dAPIs. I'll do this.

I remember we discussed the first part (only saving data for active dAPIs) in the spec and @bbenligiray wasn't sold on this.

Another side effect of this is that once we fetch a data for a beacon, we persist it forever.

We didn't discuss this which feels to me is a reason of itself to implement this. We should discuss this at the weekly call.

I'll do this.

Yeah, go ahead.

It was decided in the call to (1) not store active dapis in the state and (2) purge the signed data store by timestamp (> 24 hours) and not by active dapis.

Can you change the issue title as well?


@liquidblock I’m sorry - I shouldn’t have assumed. I’ll remember to use non-specific language in the future.

@liquidblock I’m sorry - I shouldn’t have assumed. I’ll remember to use inclusive language in the future.
Originally posted by @thedanvail in https://github.com/yewstack/yew/issues/1346#issuecomment-757371902

I assume this issue was created entirely by accident. To avoid having it show up in search results we should probably remove it, @jstarry?

I assume this issue was created entirely by accident. To avoid having it show up in search results we should probably remove it, @jstarry?

Yep, on mobile. Sorry.

Yep, on mobile. Sorry.


⚠ ClamAV has degraded performance

In 2cb72f1, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 56 ms

Resolved: ClamAV performance has improved in 4ca9792.


Papercut check for undriven signals

Fixes #179.
Example program:
import "primitives/std.lib";

component main() -> () {
  cells {
    r = prim std_reg(32);
  }
  wires {
    group no_drive {
      r.in = 32'd1;
      no_drive[done] = r.done;
    }
  }
  control {
    no_drive;
  }
}

Output:
Error:
9 |      r.in = 32'd1;
  |        ^^ [Papercut] Required signal not driven inside the group.
When driving the signal `r.in' the signal `r.write_en' must also be driven. The primitive type `std_reg' requires this invariant.

Blocked on #228


WIP: Add support for --skip and --exact test binary arguments

My half-finished attempt at #1483. It works, but clearly is not acceptable as-is because it adds a todo!() to one test, and doesn't add any tests for the new behavior.
Any hints as to how to get this into a mergable shape would be appreciated.

I'm going to pick this up and finish it off. Thanks for your work!

Thanks again for all your hard work on this! Excited to get it into the hands of folks.


Fix Stack overflow when displaying large instances of LsSeq

Fixes #341

@lihaoyi  Need help with the unit test.

Superseded by https://github.com/lihaoyi/Ammonite/commit/a6d184fcad9a0b4c5bea26f405f36dd905a1d1ba


Possibility to handle animated GIFs

Is it possible to use Vue Croppa with animated GIF's? From my understanding, the code is using a HTML 5 <canvas> element. And I'm not really sure if the <canvas> element supports animated gif's.
I tried to use croppa.generateDataUrl('image/gif') with an animated GIF, but it returned base64 PNG data instead of a GIF type.
Thank you in advance!

Any update on this?


Add License

Could you please add a License to this repository, so that everyone is allowed to use your code for their own website.
Thank you

Sure will do that.

Thank you @varunpvp
When do you think, you have time to do this?

Hi @asdoi, I've added the License to code.
Thanks.

Thank you very much


NCIT_C9088	Iris Melanoma

From @nicolevasilevsky on August 8, 2017 5:48

NCIT_C9088
Iris Melanoma
SubClassOf
Orphanet_39044
Uveal melanoma

Copied from original issue: monarch-initiative/monarch-disease-ontology-RETIRED#279

Orphanet has a syn 'Iris melanoma' for 'Uveal melanoma'

iris is part of the uvea, so not sure if these should be equiv? Should I make a ticket for Orphanet?

I think we should remove the subclassOf assertion that iris melanoma is a subclass of uveal melanoma. It also has the parent iris cancer.

why remove the assertion? Note it should just pop back if you try and remove it:
https://www.ebi.ac.uk/ols/ontologies/uberon/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0001769
I think a lot of these older tickets are no longer relevant

ok, I'll close this ticket


Use use to alias open/openat in lfs64.rs

Proposed workaround for #3264 (see that issue for details).

:pushpin: Commit 52badc617f71831b3e7addc1c0827c4395d09678 has been approved by Amanieu
It is now in the queue for this repository.

:sunny: Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: Amanieu
Pushing a6c94f4c02f597e1db4f4dd23c1ad7f6072fd8ac to main...


exp and expm1

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Description
Added exp(x) and expm1(x) function from Python math module.

Cool!
Could we also have some test cases in the function's header just like with our other functions?

Closing due to inactivity


Fixed #18 -- pass request object to WizardView.get_prefix

Added link inside release notes
Changed tests to check field inside response.context_data instead of response.content.

Updated with slight tweak to release note formatting.


tf.errors.UnknownError should include cause

System information

TensorFlow version (you are using): 2.4.1
Are you willing to contribute it (Yes/No): No

Describe the feature and the current behavior/state.
When a tf.errors.UnknownError is raised, the exception.__cause__ is not set (it is None), so if someone wants to find the underlying error, the best they can do is trying to infer it through the exception.message attribute, which is suboptimal at best.
exception.__cause__ should be set to the chained exception when known. See https://docs.python.org/3/library/exceptions.html.
Will this change the current api? How?
It will change the tf.errors.UnknownError behaviour to include more information.
Who will benefit with this feature?
Everyone who wants more control over UnknownError. For example, it is currently not possible for me to detect that the UnknownError is caused due to a PIL.UnidentifiedImageError unless I find the string in the message.
Any Other info.
Code causing the UnknownError that prompted the request:
def my_generator(img):
    img = Image.open(io.BytesIO(img))  # <- here's the `PIL.UnidentifiedImageError`
    img = tf.image.convert_image_dtype(img, tf.float32)
    yield img, tf.constant([[]], dtype=tf.float32), tf.constant([], dtype=tf.int32)

ds = tf.data.Dataset.from_generator(lambda: my_generator((image_bytes))
# ...trying to use ds...

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.


[Event Request]Application “Tests-Workflow”, 134221 "WFWH Customer Approval"

[Event Request]Application “Tests-Workflow”, 134221 "WFWH Customer Approval"
Could you please insert the OnTestInitialize Event at the beginning of Initialize procedure:

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


impl(GCS+gRPC): asynchronous ReadObject()

Part of the work for #12116

This change is

/FYI: @frankyn this should unblock some prototyping for you.


Add missing test cases for functions in common js

Add test cases for functions from common JS file

removeEmptyTags
variantsClassesToBEM

Kamino cloned this issue to hlxsites/vg-volvotrucks-us


hard to debug

Although this modular method is more convenient to maintain, how to debug the components defined by configuration files?
The breakpoints in config file can't be hit, so it is difficult to use in new project.

That's a good question. The short answer is no - it's not possible at the moment.
I'll give it some thought and reply back.
Thanks!

In the meantime, I think the best option would be to utilize automatic logging.
Currently the logging is under-developed, but I can improve it so that it'll be possible to see the selected values for each HP.
Will that help?

Yes, I guess automatic logging is a good solution, like the one used in haystack's pipeline. Thanks for the reply!


How to handle special characters

How can i get Schülzke from the API instead of that?

solved, see https://stackoverflow.com/questions/46196812/python-3-decode-string-sta195159e


Query improvements

Closes #796

We need to figure out which comparison types are allowed to be used for range keys and limit it to those.

The comparison operators allowed on the rangeKey can be found here: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.KeyConditionExpressions

The sort key condition must use one of the following comparison operators:

a = b — true if the attribute a is equal to the value b
a < b — true if a is less than b
a <= b — true if a is less than or equal to b
a > b — true if a is greater than b
a >= b — true if a is greater than or equal to b
a BETWEEN b AND c — true if a is greater than or equal to b, and less than or equal to c.

The following function is also supported:

begins_with (a, substr)— true if the value of attribute a begins with a particular substring.

I tested the PR. A simple query matchModel.query('matchId').eq('123).all().exec(); is not working as expected when the schema has an index. In this case it is using IndexName even tho I didnt use .using():
{
      ExpressionAttributeNames:  { '#qha': 'matchId' },
      ExpressionAttributeValues: { ':qhv': { S: '123' } },
      TableName:                 'Match',
      IndexName:                 'matchSpectatorsWatchingIndex',
      KeyConditionExpression:    '#qha = :qhv',
    }

I tested the PR. A simple query matchModel.query('matchId').eq('123).all().exec(); is not working as expected when the schema has an index. In this case it sets IndexName even tho I didnt use .using():
{
      ExpressionAttributeNames:  { '#qha': 'matchId' },
      ExpressionAttributeValues: { ':qhv': { S: '123' } },
      TableName:                 'Match',
      IndexName:                 'matchSpectatorsWatchingIndex',
      KeyConditionExpression:    '#qha = :qhv',
    }

All other operations seem to work correctly now.

@MickL Can I see your Schema for this?

This works with matchModel.query('matchId').eq('123).all().exec():
const Spectator = new Schema({
  spectatorId: {
    type:     String,
    rangeKey: true,
  },
  matchId:     {
    type:    String,
    hashKey: true,
  },
  watchStart:  Number,
  watchEnd:    Number,
});

This makes a query with IndexName even when not using .using(), matchModel.query('matchId').eq('123).all().exec():
const Spectator = new Schema({
  spectatorId: {
    type:     String,
    rangeKey: true,
  },
  matchId:     {
    type:    String,
    hashKey: true,
    index:   {
      name:     'matchSpectatorsWatchingIndex',
      rangeKey: 'watchEnd', // Local secondary index
    },
  },
  watchStart:  Number,
  watchEnd:    Number,
});

Hey @fishcharlie could you make any progress on this yet? :)

Hey @fishcharlie could you make any progress on this yet? :)

@MickL Sadly I have not 😞. I have been super slammed with some personal stuff. This is still on my radar and I'm hoping to look into this more by the end of the weekend at the latest. No guarantees tho.

@MickL Could you please retest this and let me know if I'm missing anything? Also I'd love a PR review here if possible. You have been reading a lot about Query recently and I forget some of the ins and outs.
If you don't feel comfortable with doing a full PR review, I'd really appreciate if you could at least review the tests I created. https://github.com/dynamoosejs/dynamoose/pull/798/files#diff-068619de362833d601fa169c3a9d30cb
In the event you try to filter using contains or attribute_exists on a rangeKey, it will use a filter expression for that rangeKey.
I just want to make sure this covers all the use cases you brought up.
Thanks!!

@hardyscc How detailed did you review?
@fishcharlie I think for a code review this is a little bit too complicated for me. But I will user-test my use cases (if there only would be a debug option 😜) and I will take time to check all your tests and compare them to the docs. Further I will see if all use cases are covered in the tests. Not sure when I have that time tho.

@MickL if the test case cover most of the scenarios, then no need to dig into the actual sources ;)


Update VCRedist Dependency

null
Microsoft Reviewers: Open in CodeFlow

2022-09-30 14:14:55.022   -- Run entry --
2022-09-30 14:14:55.022   Run as: Current user
2022-09-30 14:14:55.022   Type: Exec
2022-09-30 14:14:55.022   Filename: C:\Users\VALIDA~1\AppData\Local\Temp\is-RJUNV.tmp\vc_redist.x86.exe
2022-09-30 14:14:55.022   Parameters: /install /quiet /norestart
2022-09-30 14:15:00.483   Process exit code: 0
2022-09-30 14:15:00.499   Need to restart Windows? Yes
2022-09-30 14:15:00.514   Message box (Yes/No):
                          To complete the installation of Doxie, Setup must restart your computer.

                          Would you like to restart now?

/azp run


Server operators not allowed unlimited marker sets and markers by default

I recently installed Bluemap and Bmarker for fabric 1.21, and have run into the issue that server operators are held to the same limitations that regular players are held to unless one goes through the process of setting up permissions to bypass this using a permissions mod such as luckperms

Thanks for the report! I'll try to fix this in the next version, i thought the luckperms api would work like on paper

Fixed in newest build


Bug: Formatting issues on guestbook page

There are formatting issues for longer posts/posts with images on guestbook page

Also appears that guestbook is not working on Firefox


Is there any Python SDK Available to Sync Peerings?

Hi Team,
With new way of adding CIDR; add IP and resync peerings. This provides us a feature with no downtime which is great but is there any SDK available resync step, I can add CIDR using python SDK, but how will we resync vnet peerings(Programatically)?
Regards,
Ankit

Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'Cosmos:0.07022865,Tables:0.065957434,Synapse:0.054660767'

Hi @ankitmounty2008, thanks for your feedback! The python SDK is automatically generated based on the rest API. Can you do this on the portal? If not, this API may not be supported yet. Please go here to open a new issue.
Please provide more detailed context to help quickly locate and solve the problem.

Guys,
I am basically looking for Python SDK to achieve syncRemoteAddressSpace.
https://docs.microsoft.com/en-us/rest/api/virtualnetwork/virtual-network-peerings/create-or-update
is there any SDK or example code available

Hi ，@ankitmounty2008 . Thanks for your feedback. Here is the link of peering sample:https://github.com/Azure-Samples/azure-samples-python-management/blob/main/samples/network/virtual_network/manage_virtual_network_peering.py
I hope this will help you.

@kazrael2119 thanks for responding, however, this doesn't answer my question. I am looking for a python SDK or some help on below API Call.
https://docs.microsoft.com/en-us/rest/api/virtualnetwork/virtual-network-peerings/create-or-update
I am making a put call to sync the peering after adding an address space, however, peering gets connected but "peeringSyncLevel" always gives "RemoteNotInSync". If anyone has tried this api, please help, below is the payload:
payload="{"properties": {\n "allowVirtualNetworkAccess": true,\n "allowForwardedTraffic": false,\n "allowGatewayTransit": false,\n "useRemoteGateways": false,\n "remoteVirtualNetwork": {\n "id": "%s"\n }\n }\n}"%(remote_vnet)

Please open a support ticket to get help on the issue.


Unify logger and live document

The logger prints out the actual prompts sent to models by LiteLLM (after applying chat templates). It would be good to also include this information in the trace so that it can be viewed in the Live Document.

Closing in favor of #204


Multiprocessing: missing counter and summary

I am experimenting with client_python and I am trying to set metrics on multiprocessing application. Imitating the README and tests (test_multiprocess) I ended with this code which doesn't work:
from prometheus_client import multiprocess
from prometheus_client import generate_latest, Gauge, Counter, Summary, REGISTRY
import os
import time
import tempfile
import shutil

class Metrics(object):
    def __init__(self, idx):
        # make temp dir
        self._tempdir = tempfile.mkdtemp()
        # set os environment variable
        os.environ['prometheus_multiproc_dir'] = self._tempdir

        self._registry = REGISTRY
        self._multiprocess_registry = multiprocess.MultiProcessCollector(self._registry, self._tempdir)

        idx = str(idx)
        self.GAUGE_THREAD_POOL = Gauge('context_thread_pool_' + idx, 'Number of threads used', multiprocess_mode='all')
        self.COUNTER_APP_CALLS = Counter('context_app_calls_' + idx, 'Number of calls', registry=None, namespace='app_')
        self.COUNTER_APP_SUCCESS = Counter('context_app_success_' + idx, 'Number of successful calls', registry=None, namespace='app_')
        self.COUNTER_APP_FAILURE = Counter('context_app_failure_' + idx, 'Number of failed calls', registry=None, namespace='app_')
        self.SUMMARY_APP = Summary('context_app_' + idx, 'Time spent on app', registry=None, namespace='app_')

    def shutdown(self):
        # remove the temporary directory
        shutil.rmtree(self._tempdir)

    def collect(self):
        return generate_latest(self._registry).decode()

m = Metrics(idx=1)
m.GAUGE_THREAD_POOL.inc(3)
m.COUNTER_APP_CALLS.inc(1)
m.SUMMARY_APP.observe(3.14)

print(m.collect())

The last print misses counter and summary:
# HELP context_thread_pool_1 Number of threads used
# TYPE context_thread_pool_1 gauge
context_thread_pool_1 3.0

Version:
> pip3 show prometheus_client
Name: prometheus-client
Version: 0.0.19

> python3 --version
Python 3.5.3

Can you please suggest any change that will make the above code produce the correct summary of the registry?

Per the docs, you need to set the prometheus_multiproc_dir environment variable on the whole process.

So effectively, before the import of prometheus_client.
The following code is now working:
import os
import time
import tempfile
import shutil

# make temp dir
_tempdir = tempfile.mkdtemp()
# set os environment variable
os.environ['prometheus_multiproc_dir'] = _tempdir

from prometheus_client import multiprocess
from prometheus_client import generate_latest, Gauge, Counter, Summary, REGISTRY

class Metrics(object):
    def __init__(self, idx):
        # make temp dir
        self._tempdir = _tempdir

        self._registry = REGISTRY
        self._multiprocess_registry = multiprocess.MultiProcessCollector(self._registry, self._tempdir)

        idx = str(idx)
        self.GAUGE_THREAD_POOL = Gauge('context_thread_pool_' + idx, 'Number of threads used', multiprocess_mode='all')
        self.COUNTER_APP_CALLS = Counter('context_app_calls_' + idx, 'Number of calls', registry=None, namespace='app_')
        self.COUNTER_APP_SUCCESS = Counter('context_app_success_' + idx, 'Number of successful calls', registry=None, namespace='app_')
        self.COUNTER_APP_FAILURE = Counter('context_app_failure_' + idx, 'Number of failed calls', registry=None, namespace='app_')
        self.SUMMARY_APP = Summary('context_app_' + idx, 'Time spent on app', registry=None, namespace='app_')

        print('prometheus_multiproc_dir:', os.environ.get('prometheus_multiproc_dir', 'Not found!'))

    def shutdown(self):
        # remove the temporary directory
        shutil.rmtree(self._tempdir)

    def collect(self):
        return generate_latest(self._registry).decode()

m = Metrics(idx=1)
m.GAUGE_THREAD_POOL.inc(3)
m.COUNTER_APP_CALLS.inc(1)
m.SUMMARY_APP.observe(3.14)

print(m.collect())

And it prints:
prometheus_multiproc_dir: /var/folders/4_/pkwwb7_l1flygthtt2m0000gp/T/tmp0xf8rl
# HELP context_thread_pool_1 Number of threads used
# TYPE context_thread_pool_1 gauge
context_thread_pool_1 3.0
# HELP context_thread_pool_1 Multiprocess metric
# TYPE context_thread_pool_1 gauge
context_thread_pool_1{pid="4439"} 3.0
# HELP context_app_1 Multiprocess metric
# TYPE context_app_1 summary
context_app_1_count 1.0
context_app_1_sum 3.14
# HELP context_app_calls_1 Multiprocess metric
# TYPE context_app_calls_1 counter
context_app_calls_1 1.0
# HELP context_app_failure_1 Multiprocess metric
# TYPE context_app_failure_1 counter
context_app_failure_1 0.0
# HELP context_app_success_1 Multiprocess metric
# TYPE context_app_success_1 counter
context_app_success_1 0.0

Last question: Is there a way to have the original documentation instead of Multiprocess metric, i.e.: in the case of m.COUNTER_APP_CALLS to have the generate_latest function print Number of calls?

There isn't currently. The right number coming out is the important thing.

There isn't currently. The right number coming out is the important thing.
hello, may i have another problem please?
while using the fastapi, maybe i need multi-workers, so i ran the prometheus like:

app = FastAPI()
metrics_app = make_asgi_app()
app.mount("/metrics", metrics_app)

but when i run the counter like:
counter = Counter('context_app_calls' , 'Number of calls')

the counter will not refresh correctly because of the multiprocessing, so if i write the counter like:
counter = Counter('context_app_calls'+str(time.time()) , 'Number of calls')

it will work, but i cannot sum all the metrics because maybe it will be 50 processes.
so what should i do to get a correct result while using multi workers?
Thanks a lot

Are you using multiprocess mode as described in the README?
Also, would you please open a new Github discussion or ask on the prometheus-users mailing-list rather than asking on a closed issue.


[Bug]: Contact Us form - Name field validation

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
The "Name" field in the Contact Us form section should only accept alphabetical letters (a-z, A-Z). Currently, the field allows users to input symbols and special characters, which may lead to invalid or spam submissions.
Expected behavior
The "Name" field should only accept alphabetical letters (a-z, A-Z).
Add ScreenShots

On which device are you experiencing this bug?
Chrome
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository

Please assign me this issue.

@Trisha-tech  please assign me this issue


Add KO locale

Addition of Korean(KO) locale
Goal
Adding support of Korean language UI.
Questions/Feedback request
Adding Korean support.

Hello, sorry for not reacting to this. I haven't looked into this in a while.
Thank you for the contribution!


Chore/Bump Runtime to 6.6.0

https://github.com/nmshd/runtime/compare/6.5.0...6.6.0

I'm confused, where is the actual code for the forIdentity feature?

I'm confused, where is the actual code for the forIdentity feature?

In the runtime. ;) The facades only have an argument query that doesn't seem to be further specified.

The facades only have an argument query that doesn't seem to be further specified.

Ehrm, no! for createToken et al you need to have forIdentity as a paremeter

Oh, 6.6.0 is only personalization filtering? The personalization itself came in earlier?

Oh, 6.6.0 is only personalization filtering? The personalization itself came in earlier?

Exactly :)


[Bug] Undefined Symbols / absl: Its_20220623::variant_internal::ThrowBadVariantAccess() Error

[REQUIRED] Please fill in the following fields:

Unity editor version: 2022.3.91f1
Firebase Unity SDK version: 11.8
Source you installed the SDK: Unity Package Manager
Problematic Firebase Component: Cloud Firestore
Other Firebase Components in use:  Auth , Core,App , Storage , Remote Config
Additional SDKs you are using: Facebook , Ironsource , GameAnalytics , DevToDev
Platform you are using the Unity editor on: MacBook M1 Pro
Platform you are targeting: iOS
Scripting Runtime: IL2CPP
Pre-built SDK from the website or open-source from this repo: _____

[REQUIRED] Please describe the issue here:
After Updating firebase to the latest version 11.8 ,
Xcode fails to build our project during the final linking stage
I thought maybe its some conflict with some other sdks we have
so I removed all the sdks and kept only firebase which failed to build
Since the error mentioned Firestore related errors , I removed Firestore from the project and commented out all the code which used Firestore and it SUCCESSFULLY built in Xcode
after which I decided to just included Firestore only in the package manager and not have any Firestore #includes
in the code.
This Project also Built SUCCESSFULLY
However when I used any firestore code in the game
the subsequent export FAILS to build.
what's very peculiar to me is that
this issue started occurring to me after a specific time
on 20th March around 1PM IST I was successfully able to build the whole project with the latest 11.8 version
but after 3PM onwards the same project fails with the below error
I have tried firebase versions from 9.6 as a way to downgrade and just get the project to build to meet our business goals
but to no avail.
We are STUCK.
We are not able to move forward.
Kindly be of assistance.
Only Android Builds work.
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
What's the issue repro rate? 5/5
What happened? How can we make the problem occur?
I started getting this error on Xcode during the final linking stages

After googling and searching on the Issues here I understood that this was fixed and then I Updated to 11.8 version
after which I started getting the below error during the final linking stage in Xcode

https://github.com/firebase/firebase-unity-sdk/issues/916#issuecomment-2015894892
https://github.com/firebase/firebase-unity-sdk/issues/916#issuecomment-2017666608
linking similar issues faced by others here

FYI: Faced the same issue, found a fix for our case, see #975 (didnt see this post when starting to write that one)

Hi
we are facing the same issue as below:
We received an email from Apple requesting builds using the iOS 17 SDK or later (due date mid-April), so we proceeded accordingly. However, after upgrading to MacOS Sonoma 14.4 and Xcode 15.3, we encountered several crashes on devices running iOS 17.3 and 17.4.
To address this issue, we upgraded to Firebase SDK version 11.8.0, previously we were using version 11.6.0. Initially, this resolved the issue, and we were able to successfully build for a couple of days.
However, today, when attempting to create another build, we encountered the attached errors and are unable to proceed further with the build process. We attempted to downgrade to version 11.7.0, but encountered the same error with that version as well.
would you please give advice or help in getting out of this?

Hi all,
We are investigating this, trying to figure out why this error arose on builds that were seemingly fine before, and seeing if there are any solutions / workarounds available.

@shniqq
hey !
you fix worked worked for me
I just had to do a verbose and manual pod install to see which pods were being installed , find the mismatched pod versions of firebase
and then Modify the script you provided with the correct libraries and force the version.
I have also added a pod script in the below code which signs the relevant files in the pod file which needs selection of development team and signing as now there are many files that needs individual selection of team and signing
@ramibadran - maybe these will work you
`[PostProcessBuild( 45 )]
public static void FixPodFile( BuildTarget buildTarget, string buildPath )
{
if (buildTarget != BuildTarget.iOS)
{
return;
}
List _firebaseDependencies = new()
{
"FirebaseABTesting",
"FirebaseAppCheckInterop",
"FirebaseAuthInterop",
"FirebaseCoreExtension",
"FirebaseCoreInternal",
"FirebaseFirestoreInternal",
"FirebaseMessagingInterop",
"FirebaseInstallations",
"FirebaseSharedSwift",
};
var podfileContent = File.ReadAllLines(buildPath + "/Podfile").ToList();
var indexOfEndOfDependencies = podfileContent.FindIndex(line => line.Contains("end"));
    const string dependencyVersion = "'10.22.0'";

    foreach (var firebaseDependency in _firebaseDependencies)
    {
        podfileContent.Insert(indexOfEndOfDependencies,
            $"  pod '{firebaseDependency}', {dependencyVersion}");
    }

    var podfileContentCombined = podfileContent
        .Aggregate(string.Empty, (a, b) => a + b + Environment.NewLine);
    File.WriteAllText(buildPath + "/Podfile", podfileContentCombined);
    using (StreamWriter sw = File.AppendText( buildPath + "/Podfile" ))
    {
        sw.WriteLine("post_install do |installer|");
        sw.WriteLine("installer.pods_project.targets.each do |target|");
        sw.WriteLine("target_is_resource_bundle = target.respond_to?(:product_type) && target.product_type == 'com.apple.product-type.bundle'");
        sw.WriteLine("target.build_configurations.each do |config|");
        sw.WriteLine("if target_is_resource_bundle");
        sw.WriteLine($"config.build_settings[\"DEVELOPMENT_TEAM\"] = \"{PlayerSettings.iOS.appleDeveloperTeamID}\"");
        sw.WriteLine("end\nend\nend");
        sw.WriteLine("end");
    }
}`

@shniqq Hi
Tried this solution. Didn't help. Tried making all to 10.22.0, and also making all to 10.23.0 also. But same error in both the cases
also tried with deleing lock file and again making pod install
same error and nothing works
attached our Podfile.lock
Podfile.txt

Hey all,
So the issue is that the Firestore Unity SDK depends on a specific version of the Firestore iOS SDK, and it is incorrectly pulling in the wrong version of FirebaseFirestoreInternal (which contains an update to gRPC/absl, which is why it is getting undefined symbols in those libraries).
So, for a workaround what you can do is either:
In the Podfile generated by Unity, add the line:
pod 'FirebaseFirestoreInternal', '10.22.0'
alongside the other pods that are listed.
Or, in the Unity project, if you imported via the unityPackage, you should have a file at Assets/Firebase/Editor/FirestoreDependencies.xml
In that file add the following line below the Firebase/Firestore one:

That should result in the Podfile generating the same line mentioned in the first workaround.
Finally, if you imported the library via a package manager such that it is under Packages, what you can do is create the FirestoreDependencies.xml file mentioned above yourself, and just set that line above as the only pod.  That should then get included in the set of Dependencies.xml files, and get added to the generated Podfile.

HI @a-maurice
yes your solution working fine,we have applied it and all is well.
Thank you very much

Hey all,
So the issue is that the Firestore Unity SDK depends on a specific version of the Firestore iOS SDK, and it is incorrectly pulling in the wrong version of FirebaseFirestoreInternal (which contains an update to gRPC/absl, which is why it is getting undefined symbols in those libraries).
So, for a workaround what you can do is either: In the Podfile generated by Unity, add the line: pod 'FirebaseFirestoreInternal', '10.22.0' alongside the other pods that are listed.
Or, in the Unity project, if you imported via the unityPackage, you should have a file at Assets/Firebase/Editor/FirestoreDependencies.xml In that file add the following line below the Firebase/Firestore one: <iosPod name="FirebaseFirestoreInternal" version="10.22.0" minTargetSdk="8.0"></iosPod> That should result in the Podfile generating the same line mentioned in the first workaround.
Finally, if you imported the library via a package manager such that it is under Packages, what you can do is create the FirestoreDependencies.xml file mentioned above yourself, and just set that line above as the only pod. That should then get included in the set of Dependencies.xml files, and get added to the generated Podfile.

Thanks a lot. It actually Solved my issue.

I tried the FirestoreDependencies.xml workaround and unfortunately it did not fix, I am still getting the undefined issues.

Alright, we have a new release out that should help address this: https://github.com/firebase/firebase-unity-sdk/releases/tag/v11.8.1
Note that this release is assuming that it be pulling in:
Firebase/Firestore @ 10.22.0
FirebaseFirestoreInternal @ 10.23.0
So if you had done the workaround of pinning the FirebaseFirestoreInternal version, you will want to undo that when using this release.  The next minor version, which should be 11.9.0, will keep those two versions in sync with each other, but that relies on some changes in the cocoapods that will take a while, so this hotfix should help in the meantime.  I will close this issue, since either the workaround or hotfix should work for everyone affected.  Thanks for bringing this to our attention, and for the folks that provided the Podfile.lock, as that was very helpful.


🐛 [Android] takePhoto is slow

What's happening?
takePhoto is slow. A minimal app executes takePhoto in ~1.40s on a Motorola Moto G Stylus 5G, 0.66s on Samsung Galaxy S21 5G, and 0.48s on a Google Pixel 3a. After performing extensive logging, we can see significant durations separating shutter button press, capture request creation, capture request fulfillment, and image save.
Reproduceable Code
A minimal reproduction case is available at rnvc-playround/android-slow-capture-basic. Note the patch to RNVC that adds additional logging.
Relevant log output
Logs and summary statistics drawn from adb logcat, adb shell cmd media.camera watch, and application console may be found in rnvc-playground/android-slow-capture-basic/results. We reproduced the test on three different Android devices Google Pixel 3a, Motorola Moto G Stylus 5G, and Samsung Galaxy S21 5G.
Camera Device
The camera device is different across each of the Android handsets tested. The application logs at results/app-output.txt include the device name and selected format. Copied here:
Moto G
      	Device name: 0 (BACK) androidx.camera.camera2
      	Format: {
	  "videoStabilizationModes": [
	    "off",
	    "cinematic"
	  ],
	  "autoFocusSystem": "contrast-detection",
	  "photoWidth": 4080,
	  "supportsPhotoHdr": false,
	  "supportsDepthCapture": false,
	  "maxISO": 6400,
	  "minISO": 100,
	  "minFps": 10,
	  "videoWidth": 1920,
	  "supportsVideoHdr": false,
	  "videoHeight": 1080,
	  "fieldOfView": 75.04000877522147,
	  "maxFps": 30,
	  "photoHeight": 2296
	}

S21
      	Device name: 0 (BACK) androidx.camera.camera2
      	Format: {
	  "videoStabilizationModes": [
	    "off"
	  ],
	  "autoFocusSystem": "contrast-detection",
	  "photoWidth": 4032,
	  "supportsPhotoHdr": true,
	  "supportsDepthCapture": false,
	  "maxISO": 3200,
	  "minISO": 50,
	  "minFps": 7,
	  "videoWidth": 3840,
	  "supportsVideoHdr": false,
	  "videoHeight": 2160,
	  "fieldOfView": 80.0605180983776,
	  "maxFps": 30,
	  "photoHeight": 3024
	}

Pixel 3a
      	Device name: 0 (BACK) androidx.camera.camera2
      	Format: {
	  "videoStabilizationModes": [
	    "off",
	    "cinematic"
	  ],
	  "autoFocusSystem": "contrast-detection",
	  "photoWidth": 4032,
	  "supportsPhotoHdr": false,
	  "supportsDepthCapture": false,
	  "maxISO": 7111,
	  "minISO": 55,
	  "minFps": 7,
	  "videoWidth": 3840,
	  "supportsVideoHdr": false,
	  "videoHeight": 2160,
	  "fieldOfView": 76.94092946489485,
	  "maxFps": 30,
	  "photoHeight": 3024
	}

Device
Google Pixel 3a, Motorola Moto G Stylus 5G, and Samsung Galaxy S21 5G
VisionCamera Version
4.5.1
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information

[X] I am using Expo
[ ] I have enabled Frame Processors (react-native-worklets-core)
[X] I have read the Troubleshooting Guide
[X] I agree to follow this project's Code of Conduct
[X] I searched for similar issues in this repository and found none.

Interesting. I guess we'd have to compare with a bare CameraX android app to see if VisionCamera does anything wrong?

0.66s on a Samsung

I mean I wouldn't be surprised if this just takes really long on Android. Android is known for slower capture than iOS. 0.66s is pretty slow, so maybe this is under the highest quality and longest exposure options available, maybe some stabilization, quality prioritization or lower format resolution speeds this up.

We have tested this with a variety of configurations, and this is with flash off - if we lower quality to 720p, or set the balance to speed, it does speed up a bit, but is still very slow. Note that capturing logcat logs for the base camera is about 180ms on the slow end for full resolution capture, so this is much slower. It appears to be largely a delay between takePhoto starting and the callback executing for onCaptureStarted as a large part of the culprit, with the second delay (from onCaptureStarted to onImageSaved) being more related to resolution/settings.

@mrousavy Definitely worth taking a peek at the linked minimal repro case, summary results (brief.txt) for each device, and raw logs. The delay from shutter press to capture start exceeds the entire capture duration in the native camera app on the S21. there may be an opportunity to improve performance with careful CameraX session management within RNVC.

The native Samsung Camera app does not use CameraX.
If you remember, VisionCamera V3 didn't use CameraX either - it was Camera2 and it was much faster. Like, a lot faster.
But unfortunately it broke for like 20% of devices and I couldn't fix issues or quirks fast enough, so CameraX it is - but I still think CameraX is fast enough - maybe there's something wrong configured, or it's a new bug/regression in CameraX.
OnCaptureStarted is definitely the first event after precapture, and precapture does AF/AE/AWB triggers which are usually the parts that are really slow.
If AF/AE/AWB are already locked/focused/converged, it should be fast.

Thanks for digging in. It's unsustainable to base a device-agnostic Android camera library on Camera2. No question that Samsung can achieve faster capture on a relatively small set of supported devices using Camera2, directly. I appreciate the move to CameraX and know it offers both greater reliability and more consistent quality.
The intended purpose of this ticket is to kickstart a conversation about what RNVC might do to improve on observed CameraX performance. Perhaps there's some sort of clever CameraX session management or AF/AE/AWB defaults that might help. Or maybe this is surfacing a bug in CameraX. In any case, we're finding that a 300ms delay between shutter tap and capture start exceeds what users expect, resulting in blurry images as they move on to framing their next photo.

I ran a quick test using the Android project sample CameraXBasic. This is an outdated project running CameraX 1.1.0-beta01, so take these results with a grain of salt. I captured and saved five consecutive photos with image analysis disabled in an average duration of 306.2ms.

I repeated the test with camerax-demo, a modern sample project with more extensive use of CameraX APIs. The project was lightly modified it to the same CameraX version as the initial report, 1.4.0-beta02, as well as log timings. I captured and saved five consecutive photos in an average duration of 294.6ms. Below is logcat output, including the timing of each onCaptureStarted and onImageSaved callback (tag CAPTURE-TIMING).
2024-08-20 20:37:55.197 24747-24747 ImageCapture            com.robertlevonyan.demo.camerax      D  takePictureInternal
2024-08-20 20:37:55.198 24747-24747 CameraOrientationUtil   com.robertlevonyan.demo.camerax      D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-08-20 20:37:55.198 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  Issue the next TakePictureRequest.
2024-08-20 20:37:55.241 24747-24784 ConvergenceUtils        com.robertlevonyan.demo.camerax      D  checkCaptureResult, AE=CONVERGED AF =PASSIVE_FOCUSED AWB=CONVERGED
2024-08-20 20:37:55.243 24747-24784 Camera2CameraImpl       com.robertlevonyan.demo.camerax      D  {Camera@cfc7967[id=0]} Issue capture request
2024-08-20 20:37:55.243 24747-24784 CaptureSession          com.robertlevonyan.demo.camerax      D  Issuing capture request.
2024-08-20 20:37:55.245 24747-24784 Camera2Cap...estBuilder com.robertlevonyan.demo.camerax      D  createCaptureRequest
2024-08-20 20:37:55.388 24747-24747 CAPTURE-TIMING          com.robertlevonyan.demo.camerax      E  onCaptureStarted: after 191ms
2024-08-20 20:37:55.414 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  Issue the next TakePictureRequest.
2024-08-20 20:37:55.414 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  No new request.
2024-08-20 20:37:55.550 24747-24747 CAPTURE-TIMING          com.robertlevonyan.demo.camerax      E  onImageSaved: after 353ms
2024-08-20 20:37:55.555 24747-24747 CameraXDemo             com.robertlevonyan.demo.camerax      D  Photo saved in content://media/external_primary/images/media/1000000114
2024-08-20 20:37:56.212 24747-24747 ImageCapture            com.robertlevonyan.demo.camerax      D  takePictureInternal
2024-08-20 20:37:56.214 24747-24747 CameraOrientationUtil   com.robertlevonyan.demo.camerax      D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-08-20 20:37:56.214 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  Issue the next TakePictureRequest.
2024-08-20 20:37:56.274 24747-24784 ConvergenceUtils        com.robertlevonyan.demo.camerax      D  checkCaptureResult, AE=CONVERGED AF =PASSIVE_FOCUSED AWB=CONVERGED
2024-08-20 20:37:56.278 24747-24784 Camera2CameraImpl       com.robertlevonyan.demo.camerax      D  {Camera@cfc7967[id=0]} Issue capture request
2024-08-20 20:37:56.278 24747-24784 CaptureSession          com.robertlevonyan.demo.camerax      D  Issuing capture request.
2024-08-20 20:37:56.281 24747-24784 Camera2Cap...estBuilder com.robertlevonyan.demo.camerax      D  createCaptureRequest
2024-08-20 20:37:56.420 24747-24747 CAPTURE-TIMING          com.robertlevonyan.demo.camerax      E  onCaptureStarted: after 208ms
2024-08-20 20:37:56.447 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  Issue the next TakePictureRequest.
2024-08-20 20:37:56.447 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  No new request.
2024-08-20 20:37:56.587 24747-24747 CAPTURE-TIMING          com.robertlevonyan.demo.camerax      E  onImageSaved: after 375ms
2024-08-20 20:37:56.591 24747-24747 CameraXDemo             com.robertlevonyan.demo.camerax      D  Photo saved in content://media/external_primary/images/media/1000000115
2024-08-20 20:37:57.254 24747-24747 ImageCapture            com.robertlevonyan.demo.camerax      D  takePictureInternal
2024-08-20 20:37:57.255 24747-24747 CameraOrientationUtil   com.robertlevonyan.demo.camerax      D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-08-20 20:37:57.255 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  Issue the next TakePictureRequest.
2024-08-20 20:37:57.308 24747-24779 ConvergenceUtils        com.robertlevonyan.demo.camerax      D  checkCaptureResult, AE=CONVERGED AF =PASSIVE_FOCUSED AWB=CONVERGED
2024-08-20 20:37:57.311 24747-24779 Camera2CameraImpl       com.robertlevonyan.demo.camerax      D  {Camera@cfc7967[id=0]} Issue capture request
2024-08-20 20:37:57.311 24747-24779 CaptureSession          com.robertlevonyan.demo.camerax      D  Issuing capture request.
2024-08-20 20:37:57.313 24747-24779 Camera2Cap...estBuilder com.robertlevonyan.demo.camerax      D  createCaptureRequest
2024-08-20 20:37:57.454 24747-24747 CAPTURE-TIMING          com.robertlevonyan.demo.camerax      E  onCaptureStarted: after 200ms
2024-08-20 20:37:57.480 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  Issue the next TakePictureRequest.
2024-08-20 20:37:57.480 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  No new request.
2024-08-20 20:37:57.609 24747-24747 CAPTURE-TIMING          com.robertlevonyan.demo.camerax      E  onImageSaved: after 355ms
2024-08-20 20:37:57.612 24747-24747 CameraXDemo             com.robertlevonyan.demo.camerax      D  Photo saved in content://media/external_primary/images/media/1000000116
2024-08-20 20:37:58.354 24747-24747 ImageCapture            com.robertlevonyan.demo.camerax      D  takePictureInternal
2024-08-20 20:37:58.354 24747-24747 CameraOrientationUtil   com.robertlevonyan.demo.camerax      D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-08-20 20:37:58.354 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  Issue the next TakePictureRequest.
2024-08-20 20:37:58.407 24747-24779 ConvergenceUtils        com.robertlevonyan.demo.camerax      D  checkCaptureResult, AE=CONVERGED AF =PASSIVE_FOCUSED AWB=CONVERGED
2024-08-20 20:37:58.409 24747-24779 Camera2CameraImpl       com.robertlevonyan.demo.camerax      D  {Camera@cfc7967[id=0]} Issue capture request
2024-08-20 20:37:58.409 24747-24779 CaptureSession          com.robertlevonyan.demo.camerax      D  Issuing capture request.
2024-08-20 20:37:58.411 24747-24779 Camera2Cap...estBuilder com.robertlevonyan.demo.camerax      D  createCaptureRequest
2024-08-20 20:37:58.553 24747-24747 CAPTURE-TIMING          com.robertlevonyan.demo.camerax      E  onCaptureStarted: after 200ms
2024-08-20 20:37:58.573 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  Issue the next TakePictureRequest.
2024-08-20 20:37:58.574 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  No new request.
2024-08-20 20:37:58.704 24747-24747 CAPTURE-TIMING          com.robertlevonyan.demo.camerax      E  onImageSaved: after 351ms
2024-08-20 20:37:58.707 24747-24747 CameraXDemo             com.robertlevonyan.demo.camerax      D  Photo saved in content://media/external_primary/images/media/1000000117
2024-08-20 20:37:59.332 24747-24747 ImageCapture            com.robertlevonyan.demo.camerax      D  takePictureInternal
2024-08-20 20:37:59.333 24747-24747 CameraOrientationUtil   com.robertlevonyan.demo.camerax      D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-08-20 20:37:59.333 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  Issue the next TakePictureRequest.
2024-08-20 20:37:59.373 24747-24784 ConvergenceUtils        com.robertlevonyan.demo.camerax      D  checkCaptureResult, AE=CONVERGED AF =PASSIVE_FOCUSED AWB=CONVERGED
2024-08-20 20:37:59.375 24747-24784 Camera2CameraImpl       com.robertlevonyan.demo.camerax      D  {Camera@cfc7967[id=0]} Issue capture request
2024-08-20 20:37:59.375 24747-24784 CaptureSession          com.robertlevonyan.demo.camerax      D  Issuing capture request.
2024-08-20 20:37:59.378 24747-24784 Camera2Cap...estBuilder com.robertlevonyan.demo.camerax      D  createCaptureRequest
2024-08-20 20:37:59.519 24747-24747 CAPTURE-TIMING          com.robertlevonyan.demo.camerax      E  onCaptureStarted: after 187ms
2024-08-20 20:37:59.540 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  Issue the next TakePictureRequest.
2024-08-20 20:37:59.541 24747-24747 TakePictureManager      com.robertlevonyan.demo.camerax      D  No new request.
2024-08-20 20:37:59.678 24747-24747 CAPTURE-TIMING          com.robertlevonyan.demo.camerax      E  onImageSaved: after 346ms
2024-08-20 20:37:59.683 24747-24747 CameraXDemo             com.robertlevonyan.demo.camerax      D  Photo saved in content://media/external_primary/images/media/1000000118

I repeated the test with camerax-demo, a modern sample project with more extensive use of CameraX APIs. The project was lightly modified to use the same CameraX version as the initial report, 1.4.0-beta02, as well as log timings. I captured and saved five consecutive photos in an average duration of 409.8ms. Below is abbreviated logcat output, including the timing of each onCaptureStarted and onImageSaved callback (tag CAPTURE-TIMING).
In summary, the time to onCaptureStarted is 130ms longer, on average, under RNVC than in this sample project (using Pixel 3a). I'll need to dig in to the 3A settings to see if that ccounts for the difference. We'll also want to repeat these tests on the Samsung device since it exhibits the worst performance.
08-20 22:07:07.051 28990 28990 E CAPTURE-TIMING: onCaptureStarted: after 214ms
08-20 22:07:07.321 28990 28990 E CAPTURE-TIMING: onImageSaved: after 484ms
08-20 22:07:08.449 28990 28990 E CAPTURE-TIMING: onCaptureStarted: after 206ms
08-20 22:07:08.641 28990 28990 E CAPTURE-TIMING: onImageSaved: after 398ms
08-20 22:07:09.682 28990 28990 E CAPTURE-TIMING: onCaptureStarted: after 200ms
08-20 22:07:09.864 28990 28990 E CAPTURE-TIMING: onImageSaved: after 382ms
08-20 22:07:11.381 28990 28990 E CAPTURE-TIMING: onCaptureStarted: after 210ms
08-20 22:07:11.602 28990 28990 E CAPTURE-TIMING: onImageSaved: after 431ms
08-20 22:07:12.848 28990 28990 E CAPTURE-TIMING: onCaptureStarted: after 198ms
08-20 22:07:13.004 28990 28990 E CAPTURE-TIMING: onImageSaved: after 354ms

Using the sample app @jkaufman shared (capture-timing branch, with the change to use MINIMIZE_LATENCY), and tweaking settings a bit, I came up with these timings on the Samsung S21 device from before.
NOTE: the RNVC timings are the averages for that device. I am in the same location/quality of light, and the output images are the same dimensions.
Timings
RNVC:
onCaptureStarted: after 451ms
onImageSaved: after 650ms (199ms)
Preview on + min latency:
onCaptureStarted: after 287ms
onImageSaved: 777ms (490ms)

I'm also experiencing some delay taking picture with my Galaxy S20 ( around 0,8-1.2 sc ) 😞
Does RNVC allow to change the jPeg quality ?
I'm not sur if I get it all... But it would be possible to add a parameter to choose the jpegQuality with setJpegQuality  right ? And set it even lower than 95 ( which is the value of CAPTURE_MODE_MINIMIZE_LATENCY )
Wouldn't it improve the delays ?

That doesn’t represent much of the capture interval. Note the timings documented above.

I'm using the react native camera kit library and there I have similar difficulties, the photos are captured with a delay of 500-800ms, but on android I've made several modifications to the source code that have improved a little if one of these libraries solves the problem I will use it
https://github.com/teslamotors/react-native-camera-kit/issues/674

Huum well, as far as I understood between a onCaptureStarted and a onImageSaved two things (at least) are happening.
The picture is took
The picture is saved
For the second one, the image quality / size of the image would increase time to write it (save it) no ?
But I may be wrong and more than 90% of the time is from the first "event" : taking the shot ?
And what about the onCaptureStarted delay you show (~150ms) ? Is it linked to some AF/AE/AWB ?
Sorry I dont get it all 😅

I set up a native project with just the CameraX and these are the results

And I also tested it on the camera kit and it's the same time
That's the normal time using cameraX. Of course, this time, it is on my low-end device Moto G52 on a high-end it's faster

@ismaelsousa how much is it in VisionCamera?

pretty much the same time 1.5s on average @mrousavy

cool, so it's not VisionCamera's fault. CameraX/Android is just slow.


Image widget's value attribute should be binary serialized.

It is of type bytes. We should use binary serialization for such attributes.

Fixed in master, since the top-level value is a Bytes object.


Exclude RSS feed from creator on landing and content page

We should exclude feeds with RSS trial app-ended messages like here: https://www.wearedotnet.io/codehippie1
An API option to temporarily exclude a creator's content would be helpful (landing and content page)

@DeeJayTC Isn't this already solved? Do we already have an API endpoint for disabling a creator's content aggregation?

Only to completely disable one including profile, and not deployed yet


Release based on commit message

This PR adds the ability to manually trigger a release/publish based on the commit message.
The magic (case insensitive) message is:

ci: publish

Tests included :1st_place_medal:

Is coveralls meant to work?

Coverage decreased (-1.2%) to 76.056% when pulling 00f42a2097dec2971aa16e54bcd915978de74a5b on ci-publish-msg into c2c258aa65118a9f57794932edff7078aafbac3f on master.

Coverage decreased (-0.8%) to 76.432% when pulling 4b1544963af5fb053c10919787cc855b72f5a0ce on ci-publish-msg into c2c258aa65118a9f57794932edff7078aafbac3f on master.


Add triangular window to spectral_utils.make_window()

Also, it might make sense to move that from spectral_utils.py to utils.py

This is in the dev branch now.