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

Wip/mk/whitespace chars monospace font table viz #10563

Merged
merged 39 commits into from
Jul 23, 2024

Conversation

marthasharkey
Copy link
Contributor

@marthasharkey marthasharkey commented Jul 16, 2024

Pull Request Description

Partial (default) setting:
image

Full:
image

Off:
image

Dropdown:
10247-dropdown

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@AdRiley
Copy link
Member

AdRiley commented Jul 16, 2024

What are the 3 modes? I think I was expecting 2 modes with a single on/off toggle button.

@marthasharkey
Copy link
Contributor Author

marthasharkey commented Jul 16, 2024

What are the 3 modes? I think I was expecting 2 modes with a single on/off toggle button.

I thought there was going to be on/off and then the 'special' partial one, maybe I misunderstood and we want just on and the 'partial' setting?

@jdunkerley
Copy link
Member

Looks really good and close to the target.

We did talk about the 3 modes.
I think the off mode should still be fixed width and spaces and tabs taking the correct space but not replaced with grey text.
I imagined a dropdown rather than radio buttons (we can then have a little descriptive text).

@marthasharkey marthasharkey force-pushed the wip/mk/whitespace-chars-monospace-font-table-viz branch 2 times, most recently from dfcb990 to 2806102 Compare July 18, 2024 10:06
@marthasharkey marthasharkey marked this pull request as ready for review July 18, 2024 10:48
@radeusgd
Copy link
Member

The Full mode screenshot is not loading for me.

@radeusgd radeusgd closed this Jul 18, 2024
@radeusgd radeusgd reopened this Jul 18, 2024
@radeusgd
Copy link
Member

radeusgd commented Jul 18, 2024

I'm so sorry for the accidental close - I clicked something accidentally 🤦 - reopened

@@ -285,7 +285,7 @@ const contentStyle = computed(() => {
max-width: calc(100% - var(--permanent-toolbar-width));
/* FIXME [sb]: This will cut off floating panels - consider investigating whether there's a better
* way to clip only the toolbar div itself. */
overflow-x: hidden;
overflow: visible;
Copy link
Contributor

Choose a reason for hiding this comment

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

After this change, does the toolbar still behave correctly when the visualization is very narrow? If so, I guess the comment above can be deleted.

function getRowHeight(params: RowHeightParams) {
if (textFormatterSelected.value === TextFormatOptions.Off) return DEFAULT_ROW_HEIGHT
const rowData = Object.values(params.data)
const textValues = rowData.filter((r) => typeof r === 'string') as string[]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const textValues = rowData.filter((r) => typeof r === 'string') as string[]
const textValues = rowData.filter<string>((r) => typeof r === 'string')

Copy link
Contributor

Choose a reason for hiding this comment

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

This was marked as resolved but not addressed.

app/gui2/src/components/TextFormattingSelector.vue Outdated Show resolved Hide resolved
app/gui2/src/components/TextFormattingSelector.vue Outdated Show resolved Hide resolved
app/gui2/src/components/TextFormattingSelector.vue Outdated Show resolved Hide resolved
app/gui2/src/components/TextFormattingSelector.vue Outdated Show resolved Hide resolved
app/gui2/src/components/TextFormattingSelector.vue Outdated Show resolved Hide resolved
app/gui2/src/components/TextFormattingSelector.vue Outdated Show resolved Hide resolved
app/gui2/src/components/TextFormattingSelector.vue Outdated Show resolved Hide resolved
@radeusgd
Copy link
Member

Looking at the Partial screenshot - I feel like it is not that easy to distinguish the whitespace marks from regular characters. What if I had a text containing the ··· centered dot characters? Could we maybe use some more indicative styling, maybe making it light-gray? What do you all think?

@marthasharkey marthasharkey force-pushed the wip/mk/whitespace-chars-monospace-font-table-viz branch from 4e91cf6 to d79b08f Compare July 18, 2024 13:41
@marthasharkey
Copy link
Contributor Author

marthasharkey commented Jul 18, 2024

Looking at the Partial screenshot - I feel like it is not that easy to distinguish the whitespace marks from regular characters. What if I had a text containing the ··· centered dot characters? Could we maybe use some more indicative styling, maybe making it light-gray? What do you all think?

here is and example using 'lightgrey'
image

@marthasharkey marthasharkey requested a review from kazcw July 21, 2024 15:04
@marthasharkey marthasharkey force-pushed the wip/mk/whitespace-chars-monospace-font-table-viz branch from 5ac8373 to 54a16b6 Compare July 22, 2024 08:36
Copy link
Contributor

@kazcw kazcw left a comment

Choose a reason for hiding this comment

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

Please avoid force-pushing any non-draft branch; GitHub isn't able to show the changes since a previous review when there has been a force-push, so we use merge rather than rebase to keep branches up to date.

:title="`Text displayed in monospace font, only multiple spaces displayed with &#183;`"
@click.stop="() => emit('changeFormat', TextFormatOptions.Partial)"
/>
<button
Copy link
Contributor

Choose a reason for hiding this comment

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

All of our buttons have tooltips and some consistent styling. I see this one matches the styles by copy-and-paste, but that won't stay up to date if we change the rest of the buttons. This button too could be rendered with one of our button abstractions:

  • It could be a SvgButton. The icon can be styled using a deep-style selector: .OffButton :deep(.SvgIcon) { /* strikethrough styles */ }
  • Or it could be done with our most general button, MenuButton, which can be applied to anything to provide the button styling and tooltip.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have used Menu Button, but for all entries as this seemed to make it easier to have consistent formatting

Comment on lines -286 to -287
/* FIXME [sb]: This will cut off floating panels - consider investigating whether there's a better
* way to clip only the toolbar div itself. */
Copy link
Contributor

Choose a reason for hiding this comment

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

It's always nice to see a FIXME fixed 😄

function getRowHeight(params: RowHeightParams) {
if (textFormatterSelected.value === TextFormatOptions.Off) return DEFAULT_ROW_HEIGHT
const rowData = Object.values(params.data)
const textValues = rowData.filter((r) => typeof r === 'string') as string[]
Copy link
Contributor

Choose a reason for hiding this comment

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

This was marked as resolved but not addressed.

@jdunkerley jdunkerley added the CI: Ready to merge This PR is eligible for automatic merge label Jul 23, 2024
@mergify mergify bot merged commit 8af3fd4 into develop Jul 23, 2024
33 of 36 checks passed
@mergify mergify bot deleted the wip/mk/whitespace-chars-monospace-font-table-viz branch July 23, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add white space rendering to Text fields in Table viz
6 participants