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

feature: view pages #62

Closed
wants to merge 27 commits into from
Closed

feature: view pages #62

wants to merge 27 commits into from

Conversation

GamerGirlandCo
Copy link
Collaborator

@GamerGirlandCo GamerGirlandCo commented Aug 12, 2024

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! :)

@iamrecursion
Copy link

Asking this as an interested watcher: if view pages can have a typescript content type for the script, does that mean that the TS compiler is getting bundled?

@cdloh
Copy link

cdloh commented Aug 12, 2024

@iamrecursion
Copy link

Cheers, awesome stuff!

@blacksmithgu
Copy link
Owner

Apparently I'm allowed to push to feature PRs which is... very interesting. I've pushed some refactors and a yarn run format to the branch; testing this locally though I'm not sure how convinced I am by it's utility compared to just viewing a regular markdown page with some code embedded in it. In particular, having a plain textarea as the code input is not very good UX experience.

I'm wondering if we should adjust this to instead just load a script from a different place (like say, a markdown file) and add the ability for it to set the current file to whatever the active workspace leaf is. That matches closer to my understanding of people's use cases for side panes.

@GamerGirlandCo
Copy link
Collaborator Author

closing this because i plan to delete my fork

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.

4 participants