rocketmakers / armstrong-edge Goto Github PK
View Code? Open in Web Editor NEWArmstrong rewrite 2021
Armstrong rewrite 2021
Should be able to use formProp('stringUnionField').set('stringUnionValue')
Get Argument of type 'string' is not assignable to parameter of type 'never'
Create a form bound to any object with one of the properties being a string union type, e.g
export type ExecutionType = 'scheduled' | 'manual';
export interface IJob {
id?: string;
jobName: string;
vendorConfig: string;
companyConfig: string;
customerConfig: string;
executionType: ExecutionType;
}
then just try to manually set the property, for example
formProp('executionType').set('scheduled')
main
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
An npm token must be created and set in the NPM_TOKEN
environment variable on your CI environment.
Please make sure to create an npm token and to set it in the NPM_TOKEN
environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/
.
Good luck with your project ✨
Your semantic-release bot 📦🚀
I want Armstrong form inputs to take props for underlying native input elements via an explicit key (e.g. nativeInputProps
), rather than being optional in the component props themselves.
An example is the RangeInput taking step
as a prop, whereas it does not appear / is not implicitly referenced in the documentation args table.
https://rocketmakers.github.io/armstrong-edge/?path=/docs/form-range-input--default#with-steps
I want Armstrong to have a new component for...
Native date picker
The html dropdown flies off wildly depending on how tall the page is and what the keyboard opens
Use it on iOS
We use JIRA for issue tracking internally. If you're in Rocketmakers and you have an issue to raise, raise a ticket in JIRA and notify the #armstrong
Slack channel.
When clicking on the calendar icon the calendar does not open.
Both on right overlay and left overlay.
When clicking on either overlay the icon the calendar opens.
When clicking on either overlay the icon the calendar does not open.
We use JIRA for issue tracking internally. If you're in Rocketmakers and you have an issue to raise, raise a ticket in JIRA and notify the #armstrong
Slack channel.
Bound Input of type Number doesn't allow trailing zeros
Should let me enter a value like 1.0404
The second zero cannot be entered
Add input of type number, try to enter 1.0405
should be displayed as checked
is not displayed as checked
export const IsCheckedComponent: React.FC = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
return (
<>
<CheckboxInput checked={isChecked} onClick={() => setIsChecked(!isChecked)} />
{isChecked ? 'Is checked' : 'Is not checked'}
</>
);
};
I think the culprit is line 73 within module/src/components/checkboxInput/checkboxInput.component.tsx where it’s initial value should be equal to checkedinstead of false
Should be able to pass a value from state into a dialog via the useDialog
hook
State value displayed in dialog is always one update behind.
const [coolGuy,setCoolGuy] = React.useState("Patrick");
const [open] = useDialog<any, any>((p) =><div>{coolGuy}</div>)
return (<div>
{coolGuy}
<Button onClick={() => setCoolGuy(coolGuy === "Patrick" ? "Adam" : "Patrick")}>Toggle guy</Button>
<Button onClick={open}>Open dialog</Button>
</div>
)
Using a simple example like above, clicking the button will toggle the name in state. Opening the dialog you'll see the previous value displayed. Opening it a second time without changing state you'll see the new value.
Unable to trigger client validation messages for child forms from the parent
const { formProp } = useForm({child: {wow: ''}, hello: ''})
<ChildForm bind={formProp('child').bind()} />
<TextInput bind={formProp('hello').bind()} />
both these methods should trigger validation messages
addValidationError({key: 'child.wow', message: 'error'})
formProp('child', 'wow').addValidationError('error')
validation message is not triggered
I want to work around a bug in Armstrong which incorrectly displays calendar dropdowns
Projects using iOS calendar dropdown should use native device calendar inputs instead of Dropdown
"I’ve had a look into this and it looks like the correct-er solution is to deprecate CalendarInput in favour of NativeDateInput (and probably also deprecate Dropdown) and then make sure that deprecation is followed through on projects. This means there’s not directly work to do exactly on this ticket, but we need to do some work re: Armstrong product management."
Resolve promise in dialog hooks has implicit any so won't work in projects where this is not allowed.
The 'resolve' property of the useDialog constructor should be typed as Promise<T>
with T
coming from the first type parameter of the use dialog constructor, e.g useDialog<boolean>({ resolve ))
where resolve would be Promise<boolean>
See above image
Storybook should have code examples
MDX plugin is now SB7 compatible so we can add these back in
When you pass a number to a CalendarInput
it returns a date string rather than a number, even though the formatters (toData/fromData) claim it's a number
Passing a number in to the binder should return a number in the form state
A date string is returned
const { formProp, formState } = Form.use<ICreateStagingJobApiParams>({
vendorId: '',
companyId: '',
customerId: '',
juniperProductId: '',
oldestReleaseDate: 0,
maxFirmware: 0,
});
<CalendarInput displayMode="inputs" bind={formProp('oldestReleaseDate').bind()}/>
Log form state, oldestReleaseDate
will be a date string
ScrollToEndListener not firing when scrolling to end of the page.
ScrollToEndListener not firing when scrolling to end of the page.
To load additional fetches from the API once scrolled to the bottom of the screen
Loads the intial fetch but then doesn't load anymore afterwards once scrolled to the bottom
export const RewardsView: React.FC = () => {
const totalBiscuits = 45700;
const { accessToken } = React.useContext(Auth0Context);
const getRewards = apiHooks(accessToken).rewardClient.rewardsGet.useRequest();
const fetchItems = React.useCallback(async (pageToken?: PageToken): Promise<IInfinitePagingResult<Reward>> => {
if (!pageToken) {
console.log('No page token:', pageToken);
return { data: [] };
}
const { data } = await getRewards({ page: +pageToken, pageSize: 1 });
console.log('current items', data?.data, 'current page:', pageToken, 'and next page: ', data?.paging?.next);
return { data: data?.data || [], nextPageToken: data?.paging?.next || 1 };
}, []);
const { items, loadMore } = useInfinitePaging<Reward>(fetchItems, (item) => item?.id?.value || '', {
firstPageToken: 1,
pageSize: 1,
});
return (
<View title="Rewards" className={styles.rewardsView} unpadded={true}>
<div className={styles.totalBiscuit}>
<h3>Total Biscuits</h3>
<div>
<img src={BiscuitLogoPurple} />
{totalBiscuits.toLocaleString()}
</div>
</div>
<div className={styles.totalBiscuit}>
<h3>Total Biscuits</h3>
<div>
<img src={BiscuitLogoPurple} />
{totalBiscuits.toLocaleString()}
</div>
</div>
<ScrollToEndListener
onScrollToEnd={async () => {
console.log('Scrolled to end');
await loadMore();
}}
rootMargin={'77px'}
>
{items.map((item) => {
return (
<RewardCard
key={item?.id?.value}
image={BiscuitLogoPurple}
biscuitValue={item.priority}
company={item.name}
value={item.price}
category={item?.category?.name}
/>
);
})}
</ScrollToEndListener>
</View>
);
};
We use JIRA for issue tracking internally. If you're in Rocketmakers and you have an issue to raise, raise a ticket in JIRA and notify the #armstrong
Slack channel.
We need more variables to control some form properties
It'd be great to add a few more variables to control
Because the dialog obscurer layer closes the dialog on a mouse up event, it means trying to select text inside a form in a dialog can easily cause it to close which is pretty annoying usability-wise.
Dialog dismissal should be triggered via mouse capture, not just mouse up
Any mouse up event closes the dialog. Try making a dialog with an input in and dragging some text selection, then letting go outside of the dialog. You'll see what I mean.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.