Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add variable and expression support to serve props #895

Merged
merged 5 commits into from
Aug 22, 2022

Conversation

Caele
Copy link
Collaborator

@Caele Caele commented Aug 16, 2022

Motivation

Currently the cli-serve dev environment doesn't show property panel controls for all properties. For example all q-Props are skipped. This PR adds

  • exception for qStringExpressions: these will show up as a text field with a '=' appended
  • support for variables of specific property structure:
variable: { name: '', value: '' }

Where value will be a qStringExpression trying to evaluate the variable.

Requirements checklist

  • Api specification
    • Ran yarn spec
      • No changes
        OR
      • API changes has been formally approved
  • Unit/Component test coverage
  • Correct PR title for the changes (fix, chore, feat)

When build and tests have passed:

  • Add code reviewers, for example @qlik-oss/nebula-core

@@ -142,7 +142,7 @@ export default function FieldsPopover({ alignTo, show, close, onSelected, type }
open={show}
onClose={close}
anchorEl={alignTo.current}
marginThreshold={theme.spacing(1)}
marginThreshold={16} // theme.spacing(1)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes a MUI warning

@@ -24,7 +24,7 @@ const cfg = ({ srcDir, distDir, dev = false, serveConfig = {} }) => {
eHub: [path.resolve(srcDir, 'eHub')],
fixtures: [path.resolve(__dirname, './fixtures.js')],
},
devtool: dev ? 'eval-cheap-module-source-map' : false,
devtool: dev ? 'source-map' : false,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source maps wheren't working correctly.

@Caele Caele marked this pull request as ready for review August 16, 2022 12:14
@Caele Caele requested a review from a team August 16, 2022 12:22
@T-Wizard
Copy link
Collaborator

I would expect that adding --flags PP_EXPRESSIONS to the nebula serve command on the command line to work (It does not)

@Caele
Copy link
Collaborator Author

Caele commented Aug 17, 2022

I would expect that adding --flags PP_EXPRESSIONS to the nebula serve command on the command line to work (It does not)

Same here, not sure why it doesn't. WIll look into it. Have been using the config file instead.

EDIT: Commands give an array as ["PP_EXPRESSION"] while we want an object { PP_EXPRESSION: true }
EDIT2: Tries some things to convert it to an object, but it's not cooperating. So just leaving it out for now

@Caele Caele merged commit 3b8dc2e into master Aug 22, 2022
@Caele Caele deleted the tsm/pp-variables-expressions branch August 22, 2022 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants