-
Notifications
You must be signed in to change notification settings - Fork 409
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
Upgrade react and react-formal #1930
Upgrade react and react-formal #1930
Conversation
@@ -25,7 +25,7 @@ import { | |||
createStartedCampaign | |||
} from "../../test_helpers"; | |||
|
|||
describe("ConversationPreviewModal", async () => { | |||
describe.skip("ConversationPreviewModal", async () => { |
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.
currently throws this error which I don't know how to fix:
Invariant Violation: Could not find "client" in the context of ApolloConsumer. Wrap the root component in an <ApolloProvider>.
93 | onRequestCloseMock = jest.fn();
94 |
> 95 | component = mount(
| ^
96 | <ApolloProvider client={ApolloClientSingleton}>
97 | <MuiThemeProvider>
98 | <ConversationPreviewModal
at new InvariantError (node_modules/ts-invariant/lib/invariant.esm.js:12:28)
at invariant (node_modules/ts-invariant/lib/invariant.esm.js:24:15)
at node_modules/@apollo/react-common/lib/react-common.cjs.js:55:132
at updateContextConsumer (node_modules/react-dom/cjs/react-dom.development.js:18304:19)
at beginWork (node_modules/react-dom/cjs/react-dom.development.js:18661:14)
The error originates in the MessageResponse
component at the line:
export default loadData({ mutations })(MessageResponse);
removing the loadData
call like this lets the test pass:
export default MessageResponse
But I don't know what the issue is with loadData or how to solve it ATM.
This is awesome work! Thank you! Running it locally, I haven't found any issues at all.
because hot-loader isn't available in dev dependencies. Second, I'm getting this (or similar) Invalid Assignment error when building the client (running |
I was able to get I also added your |
scratch that. I got over excited and was looking in the wrong place. |
OKAY! Now the cypress tests pass! https://github.com/stefanhayden/Spoke/actions/runs/637837685 |
VERY EXCITING!! I've deployed your changes and can confirm that the Settings page is working now. |
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.
Amazing work!
@stefanhayden we found one more issue with the auto-completes in CampaignTextingHoursForm.jsx -- the auto-completes don't work and the times don't show am/pm but just accept absolute number text values. Similarly setting Texting Hours in (organization) Settings only shows number values without autocomplete. If I am able to work on this, I will update this PR, but if you have a chance to check it out, that would be wonderful. |
@schuyler1d Should be fixed now! Thanks for the amazing help with bug reports. |
…lete w/ different labels/values is weird with new react version and current material-ui. does not feel much of a regression Also added support for timezone range separate from hard-coding USA
@stefanhayden That change didn't seem to fix it when I was testing -- current values weren't being shown and it didn't seem to trigger a save. After some futzing, I think there's some real issue with AutoComplete component mixed with the react-formal update when the labels differ from the values. So I have a commit that switches them to fixed menus here: If that works for you, then I can merge that in. Otherwise, if you want to try getting it to work with the autocomplete, lmk and you can try your hand at it. |
…lete w/ different labels/values is weird with new react version and current material-ui. does not feel much of a regression Also added support for timezone range separate from hard-coding USA
@schuyler1d hm. I'm confused. I double checked what I had and it seemed to work for me. Here is a gif of what I see: When I pulled your code down just opening the section throws this error: so I pulled that in. |
One more issue we've discovered (Haven't had time to investigate)
|
hmmm. I'm not an expert is setting up graphql. It seems like |
On further investigation is seems that just wrapping that UserEdit in the is what cause it to die. if I remove it from the dialog it works. But I can't yet figure out what about the dialog kills it. In my branch where I'm upgrading to material-ui 4 the new dialog doesn't have this problem. stefanhayden#1 |
…st need to set it again.
@schuyler1d Fixed the edit button not working. seems like any place with that kind of graphql error we can fix by just wrapping it with the provider again. It seems the old material ui dialog just does something to not pass the context along. |
ah ha! I pushed your change into load-data.jsx so we don't need to worry about it within components. |
This was merged (with some additional changes) into Spoke 10.1 release. Post-release a regression was reported in not being able to choose the rowsize in Campaigns and Message Review DataTables -- seems to be a bug/issue with material-ui/DropDownMenu. Reporting this here for tracking and for testing when e.g. material-ui is updated. |
thanks! |
And this was merged so I'm going to close! This was AMAZING work that's really helping us remove some technical debt. Thank you!!!!! (and onward to material-ui!) |
Description
Our dependancies are way out of date. Some repos have been deprecated. Many have had many upgrades but have no CHANGELOG to guide how to upgrade.
Types of updates made:
as
prop to pass in the component like<Form.Field as={GSTextField}
react-tap-event-plugin
is deprecated and is said to no longer be an issue in browsers. So allonTouchTap
are changed toonClick
import * as yup from 'yup'
key
to be on components in arraysreact-chartjs
from working and it has been deprecated so I moved toreact-chartjs-2
Updatedchart.js
requires a new data format passed in.Form.Context
no longer exists as used onScriptList.jsx
so components have been moved around. Its seems to function correctly now but react throws an error for having a form inside a form. The design might need to be altered to get rid of that error in the future.Package Upgrades:
^15.6.1
->16.14.0
^15.6.1
->16.14.0
^0.20.0
->2.2.2
^0.24.0
->0.32.3
^3.3.0
->^3.11.0
^0.20.0
->2.2.2
^1.0.5
->DELETED
^1.15.6
^1.3.0
->4.13.0
^2.0.0
->DELETED
^1.1.1
->^2.9.4
^0.7.3
->DELETED
^2.11.1
^0.4.6
->1.3.0
Checklist: