Skip to content

feat: more visually distinct log for url transformation#563

Merged
oscarotero merged 6 commits into
lumeland:mainfrom
scarf005:arrow
Feb 4, 2024
Merged

feat: more visually distinct log for url transformation#563
oscarotero merged 6 commits into
lumeland:mainfrom
scarf005:arrow

Conversation

@scarf005
Copy link
Copy Markdown
Contributor

@scarf005 scarf005 commented Jan 28, 2024

Description

before after
image image
  1. extracted url transformation logger formatting into a single function
  2. made output url bold to be more visually distinct
  3. added arrow to indicate the transformation direction

Related Issues

resolves #557

Check List

  • Have you read the
    CODE OF CONDUCT
  • Have you read the document
    CONTRIBUTING
    • One pull request per feature. If you want to do more than one thing,
      send multiple pull request.
    • Write tests.
    • Run deno fmt to fix the code format before commit.
    • Document any change in the CHANGELOG.md.

@oscarotero
Copy link
Copy Markdown
Member

Thanks @scarf005

After seeing the screenshots, I think the current problem is in the colors. This is how I see the build log in my computer (macos):

imaxe

The page url is white and the source file is gray, so it makes easy to distinguish them.

But in your terminal, the colors are not applied. Do you have any configuration for that? Can you try if other colors are visible?

@scarf005
Copy link
Copy Markdown
Contributor Author

scarf005 commented Feb 4, 2024

image

I'm using konsole, and turns out dim isn't supported.

@oscarotero
Copy link
Copy Markdown
Member

Okay, so I propose to modify the dim format in Lume and use gray instead.
And also remove the bold style because it's not needed.
What do you think?

@scarf005
Copy link
Copy Markdown
Contributor Author

scarf005 commented Feb 4, 2024

sounds good, should we also take account for bright themes?

@oscarotero
Copy link
Copy Markdown
Member

If it's possible to detect dark/light themes it would be great.
But I guess gray will work fine in both themes.

some terminals like konsole doesn't support dim escape code.

Co-authored-by: Oscar Otero <oom@oscarotero.com>
@oscarotero oscarotero merged commit e4a98be into lumeland:main Feb 4, 2024
@oscarotero
Copy link
Copy Markdown
Member

Thank you!

@scarf005 scarf005 deleted the arrow branch February 4, 2024 15:44
@scarf005
Copy link
Copy Markdown
Contributor Author

scarf005 commented Feb 4, 2024

er, wait, i think this hasn't been properly removed:

lume/core/writer.ts

Lines 146 to 149 in e4a98be

log.info(fmt({
from: entry.flags.has("remote") ? entry.src : entry.path,
to: file.outputPath,
}));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add arrow indicator for url transformation

3 participants