notion-enhancer icon indicating copy to clipboard operation
notion-enhancer copied to clipboard

Misaligned table column headers

Open vnavone opened this issue 3 years ago • 2 comments

What is happening? When I turn on "wrap tables to page width" in the "Tweaks" extension, some of the headers in my tables become dislocated from their respective columns.

What should be happening? Headers and columns should remain in sync spatially

Screenshots (if applicable): screenshot Screen Shot 2022-01-01 at 10 38 54 AM

Operating system/browser name & version: MacOS 11.5.2, Chrome Version 96.0.4664.110 (Official Build)

notion-enhancer and/or notion-repackaged version: This occurs both in the Mac Desktop and Chrome Extension versions of NE

notion-enhancer configuration (enabled/disabled mods and their settings): Enabled mods: Tweaks - thicker bold text, full-width pages, responsive columns: 60, 30 Simpler databases Emoji sets: Twitter Collapsible properties Truncated titles - default Icon sets - default

vnavone avatar Jan 01 '22 18:01 vnavone

bug is caused by the "wrap tables to page width" option of the tweaks mod, temporarily disabling until a bugfix is released should help

dragonwocky avatar Jan 02 '22 01:01 dragonwocky

I modified relative part of the code in file .../notion-enhancer/insert/repo/tweaks/client.css at line 23-55.
This modification suits Notion version 2.14.23.10.16.34. Test on Mac M1 with MacOS Monterey.

.enhancer--tweak-normalise_table_scroll
  .notion-frame
  .notion-page-content
  .notion-collection_view-block,
.enhancer--tweak-normalise_table_scroll .notion-peek-renderer .notion-collection_view-block,
.enhancer--tweak-normalise_table_scroll
  .notion-page-template-modal
  .notion-collection_view-block,
.enhancer--tweak-normalise_table_dscroll .notion-collection-view-body .notion-table-view {
  width: 100% !important;
  padding: 0 !important;
}
/* 表格主体, 标题 */
.enhancer--tweak-normalise_table_scroll
  .notion-collection_view-block
  > [contenteditable]
  > .notion-scroller
  > [class$='view'][style*='padding'],
.enhancer--tweak-normalise_table_scroll
  .notion-collection_view-block
  > :first-child[style*='padding-right'] {
  padding: 1px !important;
}

Btw, I recommend that authors use comments when using CSS injection to indicate which element target the selector is relative to, so that when the application changes, other developers can quickly modify the CSS file to fit the new version.

Apolsus avatar Jan 28 '22 12:01 Apolsus