Conversation
|
Back to draft, since the JSX view now diplays on 3ds and wiiu as well. It should get a different template for each |
|
I updated the code to render all the different consoles/directories. Also tested all 3 of them, they seem to be working |
ashquarky
left a comment
There was a problem hiding this comment.
Good stuff all around. Just a few design thoughts and one note on how to get strong typing
apps/juxtaposition-ui/src/services/juxt-web/views/web/messages.tsx
Outdated
Show resolved
Hide resolved
apps/juxtaposition-ui/src/services/juxt-web/views/portal/messages.tsx
Outdated
Show resolved
Hide resolved
apps/juxtaposition-ui/src/services/juxt-web/views/portal/messages.tsx
Outdated
Show resolved
Hide resolved
apps/juxtaposition-ui/src/services/juxt-web/views/web/navbar.tsx
Outdated
Show resolved
Hide resolved
|
Also worth noting that our ESLint config doesn't seem to cover TSX/JSX files. I guess https://www.npmjs.com/package/@pretendonetwork/eslint-config needs updating to match the new file extensions |
|
@ashquarky I have addressed all review comments. Also added made an eslint config PR but we don't have to wait for it imo. |
binaryoverload
left a comment
There was a problem hiding this comment.
PretendoNetwork/common-configs#3 is merged, update pls :)
|
Eslint now updated, although it still has one linting bug that will be fixed in a different PR :P |
ashquarky
left a comment
There was a problem hiding this comment.
Wow, eslint made the code aesthetics way worse! ^^
Looks good though, awesome
Anything to worry about? |
|
Nothing to worry about since that has to do with reactivity engine, which we don't use and can't use. Although it's a bit sloppy to leave it there indefinitely, I'll fix it next time I work on Jsx related tasks |
changes:
messages.ejsto JSX (web only)messages.ejsto use the new JSX based viewThis partially contains #12
Since it may be useful for future porting, here is roughly the steps I took to port EJS to JSX:
{ cond ? < /> : < />}, loops:{ arr.map(v => (< />)})<img src="...">-><img src="..." />)classattributes withclassNamestyle=""attributes withstyle={{}}(jsx takes an object and not a string)<% hi %>->{hi}src="<%cdnUrl%>/test.png"->src={\${cdnUrl}/test.png``InlineScriptandInlineStyleSome more caveats:
res.locals. So I made a context object to passs around and put all of that in.