-
Notifications
You must be signed in to change notification settings - Fork 168
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
Support notes for table group #601
Conversation
- Update setting list validator of TableGroupValidator - Add setting list interpreter for TableGroupInterpreter - Update TableGroup interpreter - Update model_structure - Update testcases - Update pegjs
129bf95
to
6f8a13c
Compare
for (const name in settingMap) { | ||
const attrs = settingMap[name]; | ||
switch (name) { | ||
case 'headercolor': | ||
errors.push(...attrs.map((attr) => new CompileError(CompileErrorCode.INVALID_TABLE_SETTING, '\'headercolor\' is not supported', attr))) | ||
break; | ||
case 'note': | ||
if (attrs.length > 1) { | ||
errors.push(...attrs.map((attr) => new CompileError(CompileErrorCode.DUPLICATE_TABLE_SETTING, '\'note\' can only appear once', attr))) | ||
} | ||
attrs.forEach((attr) => { | ||
if (!isExpressionAQuotedString(attr.value)) { | ||
errors.push(new CompileError(CompileErrorCode.INVALID_TABLE_SETTING, '\'note\' must be a string literal', attr.value || attr.name!)); | ||
} | ||
}); | ||
break; | ||
default: | ||
errors.push(...attrs.map((attr) => new CompileError(CompileErrorCode.INVALID_TABLE_SETTING, `Unknown \'${name}\' setting`, attr))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only need the default
and note
case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the headercolor
case because Table has it, and we may support it for Table Group in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems fine by me
Summary
Issue
(issue link here)
Lasting Changes (Technical)
(please list down: code changes/things that have wide-effect; new libraries/functions added that can be used by others; examples below)
class EmailValidator
to validate email address' validity)Tenant#is_trial?
check)Checklist
Please check directly on the box once each of these are done