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

Add console.trace to CadView loadIfc #1235

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bldrs",
"version": "1.0.1071",
"version": "1.0.1080",
"main": "src/index.jsx",
"license": "AGPL-3.0",
"homepage": "https://github.com/bldrs-ai/Share",
Expand Down
8 changes: 4 additions & 4 deletions src/BaseRoutes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {checkOPFSAvailability, setUpGlobalDebugFunctions} from './OPFS/utils'
import debug from './utils/debug'
import {navWith} from './utils/navigate'
import useStore from './store/useStore'
import * as Sentry from '@sentry/react'
// import * as Sentry from '@sentry/react'
import {useAuth0} from './Auth0/Auth0Proxy'


const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes)
// const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes)

/**
* From URL design: https://github.com/bldrs-ai/Share/wiki/URL-Structure
Expand Down Expand Up @@ -86,7 +86,7 @@ export default function BaseRoutes({testElt = null}) {
isLoading, isAuthenticated, getAccessTokenSilently, setAccessToken])

return (
<SentryRoutes>
<Routes>
<Route path={basePath} element={<Outlet/>}>
<Route
path="share/*"
Expand All @@ -99,6 +99,6 @@ export default function BaseRoutes({testElt = null}) {
}
/>
</Route>
</SentryRoutes>
</Routes>
)
}
38 changes: 20 additions & 18 deletions src/Components/Versions/VersionsPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,29 @@ export default function VersionsPanel({filePath, currentRef}) {
const navigate = useNavigate()

useEffect(() => {
const fetchCommits = async () => {
try {
const commits = await getCommitsForFile(repository, filePath, accessToken)
if (commits) {
const versionsInfo = commits.map((entry) => {
const extractedData = {
authorName: entry.commit.author.name,
commitMessage: entry.commit.message,
commitDate: entry.commit.author.date,
sha: entry.sha,
}
return extractedData
})
setCommitData(versionsInfo)
if (setIsVersionsVisible) {
const fetchCommits = async () => {
try {
const commits = await getCommitsForFile(repository, filePath, accessToken)
if (commits) {
const versionsInfo = commits.map((entry) => {
const extractedData = {
authorName: entry.commit.author.name,
commitMessage: entry.commit.message,
commitDate: entry.commit.author.date,
sha: entry.sha,
}
return extractedData
})
setCommitData(versionsInfo)
}
} catch (error) {
debug().log(error)
}
} catch (error) {
debug().log(error)
}
fetchCommits()
}
fetchCommits()
}, [repository, filePath, accessToken])
}, [accessToken, filePath, setIsVersionsVisible, repository])


/**
Expand Down
2 changes: 2 additions & 0 deletions src/Containers/CadView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ export default function CadView({
try {
tmpModelRef = await loadIfc(pathToLoad, modelPath.gitpath)
} catch (e) {
// eslint-disable-next-line no-console
console.trace('CadView#onViewer, error: ', e)
tmpModelRef = undefined
setSnackMessage(null)
}
Expand Down
11 changes: 6 additions & 5 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
import {Helmet, HelmetProvider} from 'react-helmet-async'
import {
BrowserRouter,
useLocation,

Check failure on line 8 in src/index.jsx

View workflow job for this annotation

GitHub Actions / build

'useLocation' is defined but never used
useNavigationType,

Check failure on line 9 in src/index.jsx

View workflow job for this annotation

GitHub Actions / build

'useNavigationType' is defined but never used
createRoutesFromChildren,

Check failure on line 10 in src/index.jsx

View workflow job for this annotation

GitHub Actions / build

'createRoutesFromChildren' is defined but never used
matchRoutes,

Check failure on line 11 in src/index.jsx

View workflow job for this annotation

GitHub Actions / build

'matchRoutes' is defined but never used
} from 'react-router-dom'
import * as Sentry from '@sentry/react'
import {BrowserTracing} from '@sentry/tracing'
// import * as Sentry from '@sentry/react'
// import {BrowserTracing} from '@sentry/tracing'
import Auth0ProviderWithHistory from './Auth0ProviderWithHistory'
import BaseRoutes from './BaseRoutes'
import ApplicationError from './Components/ApplicationError'

Check failure on line 17 in src/index.jsx

View workflow job for this annotation

GitHub Actions / build

'ApplicationError' is defined but never used
import {flags} from './FeatureFlags'


Sentry.init({
/*Sentry.init({

Check failure on line 21 in src/index.jsx

View workflow job for this annotation

GitHub Actions / build

Expected space or tab after '/*' in comment
dsn: process.env.SENTRY_DSN,
environment: process.env.SENTRY_ENVIRONMENT,
integrations: [
Expand All @@ -38,6 +38,7 @@
'https://*.bldrs.dev',
],
})
*/

if (process.env.MSW_IS_ENABLED) {
const {worker} = require('./__mocks__/browser')
Expand All @@ -54,7 +55,7 @@
const root = createRoot(document.getElementById('root'))

root.render(
<Sentry.ErrorBoundary fallback={<ApplicationError/>}>
// <Sentry.ErrorBoundary fallback={<ApplicationError/>}>
<FlagsProvider value={flags}>
<HelmetProvider>
<Helmet>
Expand All @@ -67,6 +68,6 @@
</Auth0ProviderWithHistory>
</BrowserRouter>
</HelmetProvider>
</FlagsProvider>

Check failure on line 71 in src/index.jsx

View workflow job for this annotation

GitHub Actions / build

Missing trailing comma
</Sentry.ErrorBoundary>,
// </Sentry.ErrorBoundary>,
)
Loading