tl-its-umich-edu / canvas-course-manager-next

Canvas Course Manager Next: A redesign of the existing CCM application. It extends Canvas features, makes cumbersome features easier to use, and adds new features.
8 stars 9 forks source link

Allow for client-side routing, set up `/access-denied` (#48, #209) #316

Closed ssciolla closed 2 years ago

ssciolla commented 2 years ago

The PR aims to resolve #48 and #209. This is somewhat experimental, but I believe it works well. I think it could help us handle some other issues, such as #253 and #312. It also is related to the closed issue #103.

Note(s):

pushyamig commented 2 years ago

@ssciolla one thing I noticed is when you open CCM in it's own window and try some random URL, it not show access denied page, instead react code is loading and i see some error with Breadcrumbs missing data. I feel other than the routes described in the FeatureUIData.tsx should be routed to default no-page found

pushyamig commented 2 years ago

May Be in the code below you might need add a default route?

<Breadcrumbs {...{ features, pathnames }} />
      <Switch>
        <Route exact={true} path='/'>
          <Home globals={globals} course={course} setCourse={setCourse} getCourseError={getCourseError} />
        </Route>
        {features.map(feature => {
          return (
            <Route key={feature.data.id} path={feature.route}>
              <feature.component
                globals={globals}
                course={course}
                title={feature.data.title}
                helpURLEnding={feature.data.helpURLEnding}
              />
            </Route>
          )
        })}
        <Route><div><em>Under Construction</em></div></Route>
      </Switch>
ssciolla commented 2 years ago

May Be in the code below you might need add a default route?

@pushyamig, nice catch! This is a bug, there are stack traces related to Breadcrumbs working on it now. I'll also add a "nothing here" page.

ssciolla commented 2 years ago

@pushyamig, okay, this should be fixed. Please test again.