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

Racing styles fixes + update TextField + fixed UI datasync issue #13

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

BackSH00TER
Copy link

This PR addresses 3 different problems.

  1. The UI does not update when any of the events are triggered from the qb-lapraces via qb-phone:client:UpdateLapraces
  • This was happening because the event listener that calls sendUIMessage was missing the fact that the event takes an object with field type.
onNet('qb-phone:client:UpdateLapraces', () => {
  npwdExports.sendUIMessage({type: NUIEvents.UpdateData});
});
  • After making this change the DataSync component gets triggered and refreshes the UI
  • Also emit the event from DeleteTrack so the UI syncs across all clients UI
  1. The input fields on the racing app, were not preventing outside keypresses (ie: character would still walk around when WASD pressed and other keybinds were triggered.
  • This issue is fixed by using import { TextField } from 'layout/ui';. This imports the TextField component defined in the npwd packages, which correctly handles the key presses.
  1. There are a handful of styling issues happening in the app.
  • Note: We found that these styling issues are caused by the Tailwind styles imported in the phone/src/main.css. It is styling button tag directly and as a result overrides the MUI styles in many places. This solution is more of a short term / bandaid fix until a longer term solution is figured out with the use of Tailwind and MUI styles.

  • BEFORE (Tracks page)

    • image
    • image
  • AFTER

    • image
    • image
  • BEFORE (setup races)

    • image
    • image
  • AFTER

    • image
    • image

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.

1 participant