elffriend-dnd / foundryvtt-gmscreen Goto Github PK
View Code? Open in Web Editor NEWA module which creates a modular GM Screen
License: MIT License
A module which creates a modular GM Screen
License: MIT License
A configurable width would allow for 1x1 or 1x2 smaller GM screens with defined width that is smaller than width of canvas.
Bottom right position would allow the GM screen to appear as a column in desired part of the bottom screen, not exactly bottom right corner. For example 50px would allow for 50px empty space between GM screen and the chat sidebar.
Environment Details
Describe the bug
When activating the module after installing 2.0.0 it breaks when executing the migrations:
migration.js:23 Uncaught (in promise) TypeError: Cannot read property 'entries' of undefined
at _gmScreenMigrate (migration.js:23)
at foundryvtt-gmScreen.js:40
at Function._call (foundry.js:2496)
at Function.callAll (foundry.js:2456)
at Game.setupGame (foundry.js:6560)
at async Game._initializeGameView (foundry.js:7319)
at async Game.initialize (foundry.js:6471)
I'm not 100% sure if I had the module active in that world before and deactivated it in the meantime. But it wasn't active when I updated to 2.0.0.
When using this module, a non-gm user has the ability to open the GM Screen and look through all the data stored in the world. I'm not fluent in writing Foundry modules, but the User
class seems to have an isGM method on it that might be able to be used to not display the screen at all for non-gm users.
Thanks for putting such a great module idea together!
Is your feature request related to a problem? Please describe.
I need to set up Storybook to make it easier to develop this outside of Foundry context. Additionally I should use it to set up DOM snapshot testing.
Describe the solution you'd like
I'd like a storybook env which pulls in a foundry.js file from a specified location, and also a skeleton of a system to start with. From there I can write storybook stories for various use cases and run snapshot testing on them.
Additional context
This must be done for science.
We should have a DOM that looks like this:
div.window-app
div.gm-screen-container.window-content
div.grid
div.grid-cell
div.grid-cell-header
div.grid-cell-content-wrapper
div.grid-cell-content
<!-- injected sheet form -->
to allow some sheet modules (monsterblock) to pretend the window-content and window-app elements exist.
Additionally, need to verify that widths of children can be 100%ed correctly. suspect a flex issue.
Currently, the GM screen is set to a fixed height of 60vh. I'd like there to be a minor amount of modification to that height if a GM would like to cover more or less of the scene. I would like at least 80vh to be possible, and I can see a GM potentially wanting only a single row of perhaps 20vh.
while I don't see the need for 100%/fullscreen you may wish to consider this as well.
Related to #25, API for "small sheets" that systems can incorporate to show GM Screen fit data.
Environment Details
Describe the bug
Pathfinder 1e sheets (items or characters) do not scroll inside cells, making them unreadable.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I should be able to scroll vertically to view all the content. Removing the "min-height: unset" from .grid-cell-content and adding "overflow-y: auto" to .grid-cell-content-wrapper fixes the issue.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment Details
Describe the bug
When the module is NOT in drawer mode, players can access the screen and see the titles of journal sheets, even if they can't see the actual content. Players can also see images when they shouldn't have access.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Players should either not be able to access the GM screen, or should not be able to view journal entry titles in the dropdown boxes.
Screenshots
What the player sees, according to permission settings they should not have access to any of these entries:
Environment Details
Describe the bug
PF2e character/player sheets are too big I believe to properly render in a small containen.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The sheet might have to have an alternate layout to fit the screen and that is fine. I was just wondering if it could be looked into to see if we could fit the original sheet before we work on something like an alternative for this module.
Updated: The sheet doesn't render properly even if given space. The second screenshot is with two columns on an ultrawide monitor. There something else other than a space issue here.
At the moment Actors and Items use whatever sheet the Actor/Item is set to use, just rendered not as an Application.
Ideally, a GM could set a specific sheet to be used only for the GM screen. This would allow other module/system devs to create "abbreviated" sheets that work well in the limited space, but still have the full sheet available.
As part of this, we should come up with some guidelines for sheet compatibility, and start a list of "known good looking options" on the Readme/Wiki.
Is your feature request related to a problem? Please describe.
i like the idea of a gm screen but the drop down menus are difficult to navigate when you have so much data.
Describe the solution you'd like
instead of the drop down menus id like search bars. either as a replacement but in addition to all the tiles. this would increase the functionality of this module 10 fold.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
When an entity such as an Actor is updated and the sheet is re-rendered, first check the scroll position, and remember that value. After the re-render, restore the scroll position to its previous value.
Example use case:
In Monster Blocks, when a value is modified, the sheet will scroll back to the top. This is jarring and unintuitive for the user.
Environment Details
Describe the bug
Pressing escape (for example to close all open windows) hides the GM Screen button forever! Only comes back after a refresh
To Reproduce
Steps to reproduce the behavior:
Expected behavior
GM Screen button should never hide :)
Not sure the ramifications of this. I know that fromUuid
does not seem to find entities still in Compendiums.
Is your feature request related to a problem? Please describe.
It's not related ti a problem but it would be useful to have a version of the screen visible to the players in which to put rules, reminders and such things. Also having the possibility to have different "tabs" in the gm screen for better organization.
Describe the solution you'd like
Having the chance to create a "player screen", a gm screen visible to the olayers. It could be useful for when you have players new to the system to give them a quick look at rules or journals.
Also having the chance of creating different gm screens that can be navigated using tabs so a gm can organize his stuff better and be able to check more stuff without having too many things on a single grid
Health Estimates took eons to show up with GM Screen active and without were much faster. Not super sure what all could cause that but I'm guessing it was GM Screen + something else, which happened to affect Health Estimates
Module List, originally reported by Zamrod
message (5).txt
Environment Details
Describe the bug
Pressing the gear icon gives no action, and produces the following in the console log
'''
helpers.js:82 Uncaught (in promise) TypeError: Cannot read property '0' of null
at getGridElementsPosition (helpers.js:82)
at GmScreenApplication.handleClickEvent (GmScreenApplication.js:171)
at HTMLDivElement.dispatch (jquery.min.js:2)
at HTMLDivElement.v.handle (jquery.min.js:2)
'''
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Settings for that cell?
Screenshots
If applicable, add screenshots to help explain your problem.
Allow Cells to be spanned across several Rows and/or Columns. The CSS for this is simple, the data model part will be more difficult. Additionally, we must now do this in a non-breaking manner, or have a migration strategy.
Current Data Structure of Cells:
interface GmScreenGridEntry {
x?: number;
y?: number;
entityUuid?: string;
}
Proposed Change:
interface GmScreenGridEntry {
x?: number;
y?: number;
spanRows?: number;
spanCols?: number;
entityUuid?: string;
}
From that we can change each cell to set its grid-column
and grid-row
to include the span: grid-column: x / span spanCols
.
The challenging thing is going to be computing all of the emptyCells
based on how many "cells" total there are, minus how many cells are taken up by content.
Environment Details
Describe the bug
Tested with shadowrun and cyberpunk red - core: Via the electron app, the 'GM Scxreen' tab vanishes if the user presses escape. I tested this with both shadowrun and cyberpunk red - core.
Tested with shadowrun: If self-hosted, the 'GM Screen' tab remains, but tokens are 'sticky'. Pressing escape will not let go of them, and the user is forced to select a different mode (such as the measuring tool) to deselect a token.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Pressing escape should de-select a token, while retaining the 'GM Screen' tab.
Screenshots
If applicable, add screenshots to help explain your problem.
Without a safeguard, someone could click this tab and lose their screen pretty easily.
The ability to define a cell as a free text notepad to write notes. It may support Markdown but doesn't need the whole WYSIWYG support and overhead.
Notes on the gm screen are not displayed
Why stop at one GM Screen grid when you can have several? Each tab of grids should be able to have its own Row/Column Count.
For column spanning, you can use the column-count property to have monster blocks match its columns to the span. This is in place of column-width. Some allowance will need made to keep the horizontal dividers in check (so they only span one column).
If a Journal entry contains a secret block, it should be shown to the GM in the GM screen, but it is currently hidden.
Environment Details
Describe the bug
Esc Key no longer working to open the main menu.
I was caused by:
fix: ๐ intercept close method on drawer gm screen applications โฆ
Prevents esc from removing the application from the dom, instead closing the drawer
Is your feature request related to a problem? Please describe.
For my Material Deck module I'm adding a button to open and close the GM screen. I'd like to give it a visual indicator for when the screen is opened or closed. As far as I can see, there is no easy and efficient way to know when this is happening, besides constant polling.
Describe the solution you'd like
Calling a hook when the GM screen is opened or closed would help me out greatly, for example:
Hooks.callAll("gmScreen", html, openState);
Where openState is a simple true or false, depending on whether the screen is being opened or closed.
Describe alternatives you've considered
None
Is your feature request related to a problem? Please describe.
It'd be nice to have a quicker way to open Image journal entries.
Describe the solution you'd like
When I click on the image, the larger version should appear, rather than just on the little "journal" icon.
Is your feature request related to a problem? Please describe.
CSS Variables do not refresh on browser resize without user clicking "refresh" button.
Describe the solution you'd like
A timeouted solution to browser resize, which then refreshes the gm screen
Describe alternatives you've considered
Putting this off...
Additional context
We have to do it eventually....
Option (default off) to slide down the GM screen on clicking outside the GM screen. Used to avoid having to show and hide the GM screen constantly to use the canvas (since the GM covers so much of the canvas)
Describe the bug
It is hard to find specific journal entries in the Dropdown selection. All journal entries are completely randomized and unsorted!
Only journal entries are unsorted. Items and Actors are fine.
Expected behavior
Have the journal entries sorted by name. For example when we create a Scene in FVTT, the Journal entry selector there has them sorted.
Optional behavior: Add a writing field to filter entries
On macOS 10.15.7, Firefox 83.0 (64bit). Foundry 0.7.8, D&D5 1.1.1, GMScreen 1.0.0.
GMScreen cell remains blank despite me selecting an entity (whether it be an actor, item, rollable table or journal entry) from the dropdown. Refreshing the GMScreen deselects my choice (and changes nothing in the cell).
Am I doing anything wrong (or not doing something I should)?
Environment Details
Describe the bug
A clear and concise description of what the bug is.
Journals with empty body on the text and just an Image do not show any preview on the GM Screen module
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Should preview the image, like it did in very early versions of GM Screen (this worked for me before on this system)
Workaround: Add images inline on the text mode.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment Details
Description
After you pop out the GM screen, choosing options from the drop down menu doesn't change/update the data on the screen. Refreshing after picking an option restores the GM Screen to pre-popout state.
Expected behavior
The tile you chose the dropdown option for displays the data for the chosen option.
Might be nice to have a dynamic actor box that changes to the actor sheet for whatever token's turn it is. Possibly a micro-combat tracker with an "up next" token.
This feels like it could be a separate module that has a dependency on gmScreen, but if so I'd want to know how to add such a module to the screen as it likely wouldn't be drag/droppable from somewhere.
Part of this is to enable the Popout module to work with the Grid.
Quick Insert's api would be a beautiful addition to the ways a GM can populate the grid.
For GMs used to keyboard bindings, to quickly show, check something and close GM Screen
For example, Q. But should be configurable, so left-handed people ca use P or O.
Given how much of the screen the GM screen takes up, it would be useful if it were possible to make it partially transparent.
This can easily be achieved with a single CSS rule: opacity
added to the .gm-screen-app
.
Additionally, this could be configured in a few ways:
Alternatively you could use mask-image
for a gradient transparency:
I imagine an option where the opacity is set to some % when the GM screen is hovered, and when not hovered it becomes a gradient with the configured opacity at the bottom, and near-zero opacity at the top.
.gm-screen-app:hover {
-webkit-mask-image: linear-gradient(to top, rgb(0 0 0 / 70%), rgb(0 0 0 / 70%));
}
.gm-screen-app {
transition: .5s;
-webkit-mask-image: linear-gradient(to top, rgb(0 0 0 / 70%), rgb(0 0 0 / .05));
}
HTML and links in the tables description are still not parsed properly.
Originally posted by @eXaminator in #46 (comment)
Environment Details
Describe the bug
Pressing "ESC" no longer opens the menu attached.
To Reproduce
press ESC.
Expected behavior
Open menu
Is your feature request related to a problem? Please describe.
Some roll tables (like the official Savage Worlds ones) contain HTML and/or Links to Compendium Entries in their descriptions / results which is rendered properly in chat cards when rolling. When adding a roll table to the GM screen, it is displayed in a nice "read" mode, but HTML and links are not rendered properly.
Describe the solution you'd like
HTML as well as links (@Compendium[...]
) should be rendered properly to improve the readability of such tables.
A "dynamic cell" whose contents respond to the game's current state should be quite doable. The easiest example of a use case is "The Current Scene's Notes."
This is also an excuse to implement an API where other modules can register their own cells. A good example being Sound Board. Having a Dynamic Cell of "User favorite sounds" for instance would be really cool.
Is your feature request related to a problem? Please describe.
Related to performance, fromUuid is expensive and we should avoid calling it so much.
Describe the solution you'd like
Instead of just calling render()
, we should provide a method refresh()
which does the following:
Ideally this "refresh" will happen behind the scenes and the button on the UI can go away.
Basically provide a template for other Systems to submit PRs with bundled assets for their own systems as well.
I personally know dnd5e, and have things I desire to be on the GM screen. I can look at the official GM screen product and see what all on there is in the SRD, adapt and include as allowed.
Describe the solution you'd like
When having Notes, journals, characters, etc... the GM screen may be needed, and when opened, it stays behind everything else.
Forcing the GM to minimize everything, or move it or close everything before reading the GM Screen
Additional context
It may sound silly but this is preventing me at least to use GM Screen normally. As we were playing, I had many important windows open and when needed the GM Screen it was behind everything so.. it was quite inconvenient.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment Details
Describe the bug
It is not possible to click on things such as stats, attacks, skills and saving throw to roll them from an actor that is placed in the GM screen tiles
To Reproduce
Steps to reproduce the behavior:
After added an actor in one of the tiles
Expected behavior
Expected behavior would be to allow interacting with the character sheet in a way that allows using saves and such on actors in the tiles
Screenshots
If applicable, add screenshots to help explain your problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.