RocketCommunicationsInc / astro

Astro UXDS is a collection of guidelines, patterns and components for designing space-based user interface applications.
https://astrouxds.com
Other
108 stars 25 forks source link

RuxTimeline: RuxTimeRegion not rendering in RuxTrack #1130

Closed voges316 closed 1 year ago

voges316 commented 1 year ago

Describe the bug Creating a basic timeline with a single track and time region in react, the time region will not display properly in the track, and by default is set to 'display: none'.

To Reproduce Using create-react-app: npm init react-app timeline-app Add astro 7.9.3 components to package.json "@astrouxds/astro-web-components": "^7.9.3", "@astrouxds/react": "^7.9.3",

Add a simple timeline to the App.js

      <RuxTimeline
        timezone="UTC"
        interval="hour"
        start="2023-05-03T00:00:00Z"
        end="2023-05-05T00:00:00Z"
        playhead="2023-05-03T21:30:00Z"
      >
        <RuxTrack timezone="UTC" interval="hour">
          <div slot="label">Entry Name</div>
          {/* <div style={{ display: 'flex' }}> */}
              <RuxTimeRegion
                  start="2023-05-03T21:00:00Z"
                  stop="2023-05-03T22:00:00Z"
                  selected="false"
                  // style={{ display: 'flex', gridArea: '1 / 200 / auto / 300' }}
                  status="normal"
              >
                Comment
              </RuxTimeRegion>
            {/* </div> */}
        </RuxTrack>
        <RuxTrack slot="ruler">
          <RuxRuler />
        </RuxTrack>
      </RuxTimeline>

cd timeline-app; npm install && npm start

Current behavior The track is blank, and the time region does not appear at all, even though the time should be valid.

Expected behavior The time region should render as a box within the track based on the start/stop times.

Screenshots If applicable, add screenshots to help explain your problem.

image

Environment (please complete the following information):

micahjones13 commented 1 year ago

Hey @voges316 , it looks like the prop name being used on <RuxTimeRegion> is incorrect - instead of stop it should be end. ie: end="2023-05-03T22:00:00Z". Please let me know if that fixes the issue. If not, I'll investigate some more. Thanks!

voges316 commented 1 year ago

Thank you, it's hard to believe I missed that. And it is in the documentation, of course... The timeline appears to render properly after that change.

micahjones13 commented 1 year ago

No worries at all! Please reach out if you need anything else.