Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 21 2020 04:25
    abz53378 removed as member
  • Aug 03 2020 00:28
    chilijung closed #5
  • Aug 03 2020 00:28
    chilijung commented #5
  • Aug 02 2020 17:22
    machineghost opened #5
  • Dec 09 2019 11:46
    chihsuan removed as member
  • Aug 09 2019 11:22

    chilijung on canary

    Update README.md (compare)

  • Aug 09 2019 11:18

    chilijung on canary

    Create README.md (compare)

  • Aug 09 2019 11:17

    chilijung on canary

    Update README.old.md (compare)

  • Aug 09 2019 11:17

    chilijung on canary

    Update and rename README.md to … (compare)

  • Aug 07 2019 08:57
    memsethz closed #188
  • Aug 07 2019 08:57
    memsethz commented #188
  • Jul 30 2019 06:10
    cerebrowang commented #163
  • Jul 30 2019 06:09
    cerebrowang commented #163
  • Jul 30 2019 06:09
    cerebrowang commented #163
  • Jul 30 2019 06:09
    cerebrowang closed #163
  • Jul 30 2019 06:09
    cerebrowang commented #163
  • Jul 29 2019 21:26
    cerebrowang commented #163
  • Jul 29 2019 08:42
    cerebrowang reopened #163
  • Jul 29 2019 08:42
    cerebrowang commented #163
  • Jul 29 2019 02:30
    memsethz opened #188
matthew harwood
@matthewharwood
I essentially want to add schemas dynamically to a root schema from a user selection
so I have a single select toMany relation
as the user adds them I want to add a schema dynamically to the editor
Howard Chi
@chilijung
I haven't look into your schemas. But currently we haven't support dynamic schema. But you can use condition to accomplish some use cases. https://www.canner.io/docs/guides-condition-fields
Such as when a certain field fulfill with a condition, the schema inside the condition will show/hide
matthew harwood
@matthewharwood
That will work out just fine
how would I get the value from a nested array of relationships tho
Howard Chi
@chilijung
have you tried condition tag?
matthew harwood
@matthewharwood
I'mma try now looks like I need to just add teh value
Howard Chi
@chilijung
Nice, sorry that I'm on my phone, no computer besides me... Let me know if you have any further questions or suggestions.
Howard Chi
@chilijung
@matthewharwood or you can look into custom components https://www.canner.io/docs/tutorial-customize-string-component. If your schema is not simply read and write data. You could customize logic in your custom components.
Which we use pretty often in Canner internally.
matthew harwood
@matthewharwood
@chilijung I got somethign working for now which is pretty awesome
<array
      keyName="components"
      title="components"
      ui="table"
      uiParams={{
        columns: [{
          title: 'components',
          dataIndex: 'routeHeader' // WhATS THE proper dataIndex to select headerTitle???
        }]
      }}
    >
      <string
        keyName="component"
        ui="select"
        uiParams={{
          options: [{
            text: 'header',
            value: 'HEADER'
          }, {
            text: 'Customer picks up ',
            value: 'NA'
          }]
        }}
      />
      <Condition
        match={value => value.component === 'HEADER'}
      >
        <object keyName='routeHeader'>
          <string keyName="headerTitle" title="Header Title" />
          <string keyName="headerDesc" title="Header Description" />
        </object>
      </Condition>
    </array>
Howard Chi
@chilijung
Nice!! Awesome! :)
matthew harwood
@matthewharwood
Whats the proper dataIndex to select headerTitle?
Howard Chi
@chilijung
routeHeader.headerTitle
and you can also use render function to get the data value
Here's an example, you can call render(text, data) text is the value from the dataIndex.
data is to access the full data
this will also work
columns: [{
          title: 'components',
          dataIndex: 'routeHeader',
         render: (text, data) => {
            console.log(data.headerTitle) // will get your headerTitle value also
         }
        }]
matthew harwood
@matthewharwood
awesome!
matthew harwood
@matthewharwood
@chilijung One more doozy for you lol ... Im trying to refactor all these logic into a datastructure/config
import {Header} from '../libs/mh-header/src/header.schema';

const blockConfig = [{
  text: 'Header',
  value: 'HEADER',
  Component: Header,
}];

//...



<array
      keyName="components"
      title="components"
      ui="table"
      uiParams={{
        columns: [{
          title: 'components',
          dataIndex: 'routeHeader.headerTitle'
        }]
      }}
    >
      <string
        keyName="component"
        ui="select"
        uiParams={{
          options: blockConfig,
        }}
      />
      {blockConfig.map(({Component, value, text}, index) => {
        return (
          <Condition
            match={v => v.component === value}
          >
            <Component keyName={text} />
          </Condition>
        );
      })}

    </array>
Howard Chi
@chilijung
Nice!
:thumbsup:
Siou
@abz53378
@mirjamthomet_gitlab , sorry for the late reply, I just try to reproduce it and I think the rules of your storage blocks Canner to upload image, check out firebase docs, thanks!
matthew harwood
@matthewharwood

@abz53378 @chilijung is it possible to loop over <Conditions> blocks? Loops work with simple schemas but not when you wrap them in conditionals.

This will work:

const blockConfig = [{
  text: 'Header',
  value: 'HEADER',
  Component: Header,
}];
    <array
      keyName="components"
      title="components"
      ui="table"
      uiParams={{
        columns: [{
          title: 'components',
          dataIndex: 'blockName2'
        }]
      }}
    >
    <string
        keyName="component"
        ui="select"
        uiParams={{
          options: blockConfig,
        }}
      />
      {blockConfig.map(({Component, value, text}, index) => {
        return (
          <Component keyName="blockName2" />
        )
      })}
</array>
but this will not work:
const blockConfig = [{
  text: 'Header',
  value: 'HEADER',
  Component: Header,
}];
    <array
      keyName="components"
      title="components"
      ui="table"
      uiParams={{
        columns: [{
          title: 'components',
          dataIndex: 'blockName2'
        }]
      }}
    >
    <string
        keyName="component"
        ui="select"
        uiParams={{
          options: blockConfig,
        }}
      />
      {blockConfig.map(({Component, value, text}, index) => {
        return (
          <Condition
            match={v => v.component === value}
          >
            <Component keyName="blockName2" />
          </Condition>
        )
      })}
</array>
error
utils.js?64ff:25 Uncaught TypeError: Cannot read property 'toUpperCase' of undefined
    at getType (utils.js?64ff:25)
    at createField (utils.js?64ff:33)
    at eval (arrayField.js?4f4f:102)
    at eval (_createBaseFor.js?b649:17)
    at baseForOwn (_baseForOwn.js?a291:13)
    at eval (_createBaseEach.js?6123:17)
    at forEach (forEach.js?4398:38)
    at ArrayField.forEach (arrayField.js?4f4f:101)
    at fieldToQueriesObject (utils.js?7e77:50)
    at eval (utils.js?7e77:51)
getType @ utils.js?64ff:25
createField @ utils.js?64ff:33
(anonymous) @ arrayField.js?4f4f:102
(anonymous) @ _createBaseFor.js?b649:17
baseForOwn @ _baseForOwn.js?a291:13
(anonymous) @ _createBaseEach.js?6123:17
forEach @ forEach.js?4398:38
forEach @ arrayField.js?4f4f:101
fieldToQueriesObject @ utils.js?7e77:50
(anonymous) @ utils.js?7e77:51
(anonymous) @ arrayField.js?4f4f:103
(anonymous) @ _createBaseFor.js?b649:17
baseForOwn @ _baseForOwn.js?a291:13
(anonymous) @ _createBaseEach.js?6123:17
forEach @ forEach.js?4398:38
forEach @ arrayField.js?4f4f:101
fieldToQueriesObject @ utils.js?7e77:50
(anonymous) @ utils.js?7e77:199
(anonymous) @ lodash.min.js:101
(anonymous) @ lodash.min.js:46
mt @ lodash.min.js:27
An.mapValues @ lodash.min.js:101
schemaToQueriesObject @ utils.js?7e77:198
Query @ index.js?e1f6:74
(anonymous) @ Provider.js?846e:148
Provider @ Provider.js?846e:426
constructClassInstance @ react-dom.development.js:11911
updateClassComponent @ react-dom.development.js:13614
beginWork @ react-dom.development.js:14293
performUnitOfWork @ react-dom.development.js:16319
workLoop @ react-dom.development.js:16358
callCallback @ react-dom.development.js:140
invokeGuardedCallbackDev @ react-dom.development.js:178
invokeGuardedCallback @ react-dom.development.js:227
replayUnitOfWork @ react-dom.development.js:15772
renderRoot @ react-dom.development.js:16418
performWorkOnRoot @ react-dom.development.js:17015
performWork @ react-dom.development.js:16936
performSyncWork @ react-dom.development.js:16908
requestWork @ react-dom.development.js:16808
scheduleWork$1 @ react-dom.development.js:16674
scheduleRootUpdate @ react-dom.development.js:17241
updateContainerAtExpirationTime @ react-dom.development.js:17268
updateContainer @ react-dom.development.js:17295
ReactRoot.render @ react-dom.development.js:17578
(anonymous) @ react-dom.development.js:17718
unbatchedUpdates @ react-dom.development.js:17135
legacyRenderSubtreeIntoContainer @ react-dom.development.js:17714
render @ react-dom.development.js:17773
(anonymous) @ _cnr-54305c4JrIObUVWA5.js?8b3f:10
../../../../var/folders/sw/6v3zy1rd4bg6y6nn_pthlcn40000gn/T/_cnr-54305c4JrIObUVWA5.js @ main.bundle.js:997
__webpack_require__ @ main.bundle.js:788
fn @ main.bundle.js:151
0 @ main.bundle.js:1093
__webpack_require__ @ main.bundle.js:788
checkDeferredModules @ main.bundle.js:46
(anonymous) @ main.bundle.js:926
(anonymous) @ main.bundle.js:929
react-dom.development.js:14691 The above error occurred in the <Provider> component:
    in Provider (created by CannerCMS)
    in IntlProvider (created by CannerCMS)
    in CannerCMS (created by CannerContainer)
    in div (created by Basic)
    in Basic (created by Adapter)
    in Adapter (created by CannerContainer)
    in div (created by BasicLayout)
    in BasicLayout (created by Adapter)
    in Adapter (created by CannerContainer)
    in div (created by BasicLayout)
    in BasicLayout (created by Adapter)
    in Adapter (created by CannerContainer)
    in CannerContainer (created by CMSPage)
    in div (created by BasicLayout)
    in BasicLayout (created by Adapter)
    in Adapter (created by CMSPage)
    in CMSPage (created by Route)
    in Route (created by App)
    in Switch (created by App)
    in Router (created by BrowserRouter)
    in BrowserRouter (created by App)
    in App

React will try to recreate this component tree from scratch using the error boundary you provided, CannerCMS.
logCapturedError @ react-dom.development.js:14691
logError @ react-dom.development.js:14730
callback @ react-dom.development.js:15416
Carlos Toro
@CharliToro_gitlab
hi @abz53378 @chilijung , in the documentation do not have many information about resolvers. I have a endpoint with graphql, I created an GraphqlClient. a dont know use the resolvers, help me please...
Howard Chi
@chilijung
Hi, @matthewharwood @CharliToro_gitlab Can you guys move the issues and problems you are having to https://spectrum.chat/canner -- Spectrum. We are moving our community there, since we have many duplicate questions which is more easier to track and searchable for others. Thank you!
@/all Canner community is moving to Spectrum. Since we want the questions to be easier to track and search for others. Thank you!
matthew harwood
@matthewharwood
Np
Carlos Toro
@CharliToro_gitlab
ok
Howard Chi
@chilijung
Sorry, wrong link please post Canner CMS related questions here 👉https://spectrum.chat/canner/cannercms in CannerCMS channel, thanks.
Siou
@abz53378

Hi, @matthewharwood, I just release the @canner/cli@2.7.5 to fix it, really thanks for the report, that is indeed a bug which causes <Layout /> break in the map function. Btw, in this line, <Component keyName="blockName2" />, the keyName should be unique, eg <Component keyName={text} />.

If there are further questions, feel free to open a conversion on our spectrum, thanks !

matthew harwood
@matthewharwood
Thanks !!!
John Gannon
@J0hnGann0n

Hi I have a Problem with Canner since today when I try to server or deploy:
canner script:serve
\ Building CMS...C:\snapshot\cli\node_modules\npm-check-install\lib\checkPkg.js:30
if (pkgJSON.dependencies && pkgJSON.dependencies[pkgName]) resolve(true);else resolve(false);
^

TypeError: Cannot read property 'dependencies' of undefined
at _promise2.default.exec (C:\snapshot\cli\node_modules\npm-check-install\lib\checkPkg.js:30:19)
at ChildProcess.exithandler (child_process.js:282:5)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:557:12)

Howard Chi
@chilijung
Hi @J0hnGann0n can you post your problem in Spectrum -- https://spectrum.chat/canner/cannercms we are moving the community there thanks!
slabo
@slabo
Hello
I've built an android app and it uses firebase as it's database.
I want to build a webpage to create content for the app.
I understand it should use the same firebase project, but should it use the same app too ?
firebase app..
all this is getting too confusing for me. Back when I was in uni, I never knew about this multilayer architecture stuff.
slabo
@slabo
moving question to spectrum ..
Carlos Guadir Aza
@cossoft_gitlab
Hello, I would like to connect with Apollo graphql endpoint, but documentation is only for Firebase API, any one could help me?
Howard Chi
@chilijung
@cossoft_gitlab hi, can you move your questions to spectrum? Thank you! https://spectrum.chat/canner/cannercms