-
Notifications
You must be signed in to change notification settings - Fork 351
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
Favorites ux refresh #1278
Favorites ux refresh #1278
Conversation
Favorite saved automatically Function to export as cypherfile Fix issue with font lig Implement multiselection Nicer context menu stay selected Drag multiple Fix naming bug Improve static scripts Cleanup Remove unused imports Better drag Improve pattern check Only missing icons Rebase issues Align icons Fix text in dark mode
if (!codeFontLigatures) { | ||
wrapperClassNames.push('disable-font-ligatures') | ||
} | ||
const wrapperClassNames = codeFontLigatures ? '' : 'disable-font-ligatures' |
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.
Fixes a type error and maybe issue with disabled font ligatures
@@ -290,7 +290,6 @@ export function EditorFrame({ | |||
variables: { | |||
projectId, | |||
fileUpload: new File([editorValue], name), | |||
destination: `./${name}`, | |||
overwrite: true |
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.
not needed since we only save to root
${contents.join('\n')}` | ||
: `// ${newName} | ||
? `//${newName} | ||
${NonNamecontents.join('\n')}` |
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.
Solves bug that added whitespace on rename
@@ -26,6 +26,22 @@ import { Folder } from 'shared/modules/favorites/foldersDuck' | |||
|
|||
export const CYPHER_FILE_EXTENSION = '.cypher' | |||
|
|||
export function exportFavoritesAsBigCypherFile(favorites: Favorite[]): void { |
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.
This feature has been requested, and the implementation works. But there's no UI element to call this function yet
@@ -26,6 +26,22 @@ import { Folder } from 'shared/modules/favorites/foldersDuck' | |||
|
|||
export const CYPHER_FILE_EXTENSION = '.cypher' | |||
|
|||
export function exportFavoritesAsBigCypherFile(favorites: Favorite[]): void { | |||
const fileContent = favorites |
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.
Maybe a matter of taste, but I think a map and join is easier to read than a reduce and template literal
const fileContent = favorites
.map((favorite) => favorite.content)
.join("\n\n")
.trim();
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.
Yeah it's clearer, thanks!
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.
LGTM
@@ -0,0 +1,11 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> | |||
<g> |
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 think tab indentation is inconsistent with the other SVGs
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.
Hmm they seem to re-appear on save when I remove them. I'll look into it in another PR
This PR aims to improve the usefulness of favorites by adding a context menu to each favorite and adding bulk operations.
Changelist (in the order they appear in the "Files changed" tab):
Preview available at http://favorites_ux_refresh.surge.sh