Skip to content

Conversation

@GamerGirlandCo
Copy link
Collaborator

to quote the roadmap:

Special page types which are just Datacore views and which can be put into the side bar or as regular pages.

each view page has its own state consisting of the following properties:

  • sourceType: the type of script this view will contain (ex: ts, js, jsx, tsx...)
  • script: the actual source code for the script
  • title: the title, as displayed in the tab/view header
  • currentFile: the configurable path to the current file, so that functions and hooks such as useCurrentPath don't choke

all of these are configurable via the view's settings page, which can be accessed via going into the three-dot menu and clicking "View configuration".

a command to create a view page has also been added to the command palette for ease of use.

as always, let me know if i should add or change anything! :)

@GamerGirlandCo GamerGirlandCo force-pushed the feat/view-pages branch 5 times, most recently from c98ca53 to 7ff5e71 Compare April 27, 2025 20:22
// export the necessary contexts to enable rendering
// datacore components outside the datacore plugin
// itself
get SETTINGS_CONTEXT(): typeof SETTINGS_CONTEXT {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I'd do it like this - it's better to expose hook functions which load this data instead (like dc.useSettings()).

* Primarily intended to be used with `useAsync`.
*/
public Suspend({
loaded: loaded,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Un-neccessary : loaded.

);

// Views: DatacoreJS view.
// @ts-ignore be quiet
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can this not be typed?

@blacksmithgu
Copy link
Owner

Added comments on the auxiliary pieces.

@GamerGirlandCo GamerGirlandCo force-pushed the feat/view-pages branch 7 times, most recently from 4c324a6 to 60e3b70 Compare May 10, 2025 03:38
@GamerGirlandCo GamerGirlandCo force-pushed the feat/view-pages branch 3 times, most recently from 8b3fd7b to b89038f Compare June 18, 2025 00:13
@GamerGirlandCo GamerGirlandCo force-pushed the feat/view-pages branch 9 times, most recently from d7523f9 to 2e9d34a Compare June 30, 2025 00:21
@GamerGirlandCo GamerGirlandCo force-pushed the feat/view-pages branch 14 times, most recently from c723a25 to 565d5a2 Compare August 4, 2025 20:17
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.

3 participants