-
Notifications
You must be signed in to change notification settings - Fork 383
Update local space to use shared components #948
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
Conversation
0e4d6db
to
392a33e
Compare
fdf742c
to
ffce197
Compare
Implement topbar tree map Add local UI component Add breadcrumbs implementation Add shared modal implementation in local topbar Initial theme handling Add initial theme discard Add basic theme options to NavigatorItem Add initial theme setup for components Add navigator v2 themes Add folder list v2 themes Update some buttons via v2 button theme Add second iteration of theme updating Updated preferences tab components Updated topbar action items components Update bottom bar selection components Fix some preferences buttons and tabs Add shared styles for SearchModal component Add shared styles for preferences keymap tab Use shared global style Fix topbar breadcrumbs for specific storage cases Remove duplicate storage breadcrumbs where not needed Implement editing of storage name (localUI) Fix folder rename (localUI) Fix local UI for trashing and deleting note Fix no dialog on delete folder/note Update App.tsx with new dialog Fix local search colors Fix local search and local replace colors (v2 theme) Fix CodeEditor marks colors Discard local modal Discard local modal since cloud one is generic now Fix cloud intro modal Fix cloud intro modal colors Update Form to v2 style Update style functions for primary and secondary buttons Fix some size issues in folder view Fix folder navigation style (v2 update) Fix code fence styles Update code fence styles to v2 theme Fix shared context menu provider for local space Add shared context menu provider implementation in local space App Fix a typo in local space UI Implement proper topbar folder breadcrumbs Remove old topbar breadcrumbs on folder view Add folder page breadcrumbs when on folder view (no note view) Discard old topbar controls and use shared topbar controls (implement them based on previous) Comment out the toggle context view on topbar controls Add initial side bar mappers Add search API Update search structure for local space Implement sidebar mappers except for tree Half tree mapping done Add full tree implementation mock Todo: DND from local space Todo: Implement sidebar folding and other API Fix folder and note parent IDs Still need to fix some todos, styling and implement rest of items Implement Dnd Implement sidebar folding Add sidebar collapse store Fix recursion on folder Update v2 combined providers Reorganize storage sidebar items Fix storages, folders and note mappings Update sidebar to show workspace Update sidebar to show workspace and put notes and folders from storage to workspace root Rename tags to labels, note to doc and storage to workspace (v2 part of API, DB still not) Implement test DnD Refactor more v2 components to new naming Rename routes to doc and workspace, tags to lables and trashCan to archive Refactor sidebar Refactor sidebar application container Use shared app layout Implement rest of dnd Refactor more of application layout Implement proper sidebar toolbar instead of AppNavigator one Fix some search issues for matching note content Overall spaces mapping fix Fix context view component Fix topbar breadcrumb global style border issue Fix App navigator (revert) Add sidebar state in general status Implement timeline mapping for local Fix two bugs Fix topbar rendering fight on z-index with code mirror editor (set code mirror one to z-index: 0) Fix parent folder in breadcrumbs, should be set to breadcrumb folder so that new one goes inside Refactor code Refactor code into application structure Create Application main component Refactro WikiNotePage to use Application component Add separate ArchivePage Add separate AttachmentsPage Add separate LabelsPage Refactor some trash to archive namings Update to appropriate buttons on archive/label pages Update folder detail icon Use shared icon for folder detail view Set color of the icon and size for note/labels/folder/archive view Add timeline page Implement most of the components Fix timeline page Add archived at property Update events handling and show more button Set gray tags only Refactor code in timeline Fix DocLink (add style only) to not refresh the page as it is link with href and onClick prop Update preferences styling Update most of the styles for preferences Set all updated style to shared style functions Update some components Refactor AppNavigator Port features from AppNavigator Refactor CreateStoragePage Update Icon components in molecules and atoms in local space to use shared one Fix AttachmentsPage (no storage in Application component) Revert export buildSpacesBottomRows function Remove unused components from local Use Spinner from shared in cloud Removed bunch of now unused components (replaced by topbar and sidebar) Fix AppNavigator for cloud spaces For now using 2 navigators since its hard to refactor the code to use component in single place In local space there is need for sidebar and other items, in cloud space they are provided via webview In local space with toolbar off on sidebar it does not layout well with AppNavigator being hidden (even after z-index fix, it stays on top rather than move the sidebar) Refactor NoteStorageNavigator Remove unused code Rename component Update to shared toast Dialog/Modal/Toast from shared Remove few components Fix some bugs and error handling in localUI component Update topbar properties to have type for breadcrumbs (button and not separator) Update success messages across pushMessage new toast API Refactor FolderDetailListNoteItem Use WithTooltip and Button from shared components Add Search Highlight colors to shared common theme Update more components to shared Replace some buttons to use shared one Replace some links to use shared one (with inline encapsulation) Remove some unused components Refactor form buttons Refactor more components to shared Refactor AboutTab links Update storage create to shared form elements Rebase and update to latest master (new nav buttons) Update FormRowProps location in localUI Add sidebar hide option Update keymap component buttons Replace KeymapItemButton with shared one Fix global content search results and style Update to correct shared style colors for highlight Fix global search note and note content results (note content results not showing) Remove redundant console.logs from search results API Refactor more components to shared Update context view labels input and rendering (similar to cloud) Update ProgressBar to shared style theme Refactor form input to allow onKeyDown event as well Remove unused components after refactor
Keep only EN-US language
b3b0686
to
4bbe9d5
Compare
Update archived at in PouchDB as well Implement batch export in new sidebar Add batch export options in modal dialog Refactor some components (folder select form item) Expand FormSelect item with labels Refactor preference pages (discard deprecated ones) Refactor EditorTab Replace editor tab preference components with shared ones
4bbe9d5
to
06a36bd
Compare
Refactor cloud pages to use its own or shared Icon Use shared Icon component in local space
Adjust all components to use shared Refactor createStorageDialog to be in localUI hook
Fixes tag color not being persistently updated on changing views (other notes etc.)
Refactor Sidebar container to use localUI hook for database API Resolve some folder to workspace drop in drag and drop Refactor components to use localUI Remove unused code Remove some console logs Add safe net when updating folder goes wrong (check null before adding to noteIdSet) Found a bug with BasicInputFormLocal should be refactored (sometimes tries to update while already unmounted) - left comment
Allow user to migrate data Later remove all references from code and whole pouchDB handling
Add sort to note events in Timeline Fix new doc button
Remove unused code Remove console logs
Add another bug, cursor not being focused and changed on already open note focus
src/cloud/lib/mappers/topbarTree.ts
Outdated
@@ -57,6 +57,7 @@ export function mapTopbarTree( | |||
) | |||
|
|||
folders.forEach((folder) => { | |||
if (folder.pathname == '/') return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a mistake, changing this in cloud mapper, I'll revert this.
I suppose its not a mistake in rebasing
Remove cloud changes mistakes Refactor bunch of components (small issues, unused code, typos) Refactor removeAttachment to localUI hook
Replace h3 with span element
Add open exported asset in explorer and focus it Expand Toast to support onClick Support on hover class when onClick is bound to Toast
Add export tab in preferences Add PDF export options (margins, pageSize, landscape mode, page background color)
toggleShowingCloudIntroModal, | ||
]) | ||
|
||
const localSpaces = values(storageMap) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use any functions returning a new array or an object. This makes other hooks useless.
src/lib/db/patterns.ts
Outdated
import { NavResource } from '../v2/interfaces/resources' | ||
|
||
export function getResourceId(source: NavResource) { | ||
if (source.type === 'doc') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this function or this conditional statement since it i returning same value
scrollbar-width: 8px; | ||
scrollbar-height: 8px; | ||
//scrollbar-width: 8px; | ||
//scrollbar-height: 8px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just discard them if we don't need
src/lib/styled/BaseTheme.ts
Outdated
@@ -1,3 +1,5 @@ | |||
// import { BaseTheme } from '../../cloud/lib/styled/themes/types' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discard comments
src/lib/localStorageKeys.ts
Outdated
@@ -6,6 +6,7 @@ export const defaultStorageCreatedKey = | |||
'note.boostio.co:defaultStorageCreatedKey' | |||
export const appModeChosenKey = 'note.boostio.co:appModeChosen' | |||
export const checkedFeaturesKey = 'note.boostio.co:checkedFeaturesKey' | |||
export const sidebarCollapseKey = 'note.boostio.co::sidebar' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use one colon
const [value, setValue] = useState(defaultInputValue) | ||
|
||
// seems to sometimes do some update on un-mounted component (called in openModal which closes itself) | ||
useEffectOnce(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Focusing or not should be determined by its parent component. So please use ref so the parent can access the element and focus
Description - TODO