Coder Social home page Coder Social logo

Comments (12)

kometenstaub avatar kometenstaub commented on August 22, 2024

That should work, pjeby added support for it three hours ago: pjeby/pane-relief@363b7d2

from customizable-page-header-buttons.

kometenstaub avatar kometenstaub commented on August 22, 2024

Here's CSS with which the count can be added. The alignment could be a bit better, but for that I'd need to make changes.

.view-action.page-header-button.app\:go-back::before {
    content: var(--pane-relief-backward-count);
    padding-right: 0.4em;
}

.view-action.page-header-button.app\:go-forward::after {
    content: var(--pane-relief-forward-count);
    padding-left: 0.4em;
}

from customizable-page-header-buttons.

kometenstaub avatar kometenstaub commented on August 22, 2024

The alignment is complicated, and needs individual treatment for themes.

.view-action.page-header-button.app\:go-back::before {
    content: var(--pane-relief-backward-count);
    padding-right: 0.4em;
    font-size: 0.95em;
    vertical-align: top;
}

.view-action.page-header-button.app\:go-forward::after {
    content: var(--pane-relief-forward-count);
    padding-left: 0.4em;
    font-size: 0.95em;
    vertical-align: top;
}

This moves the icons down (mis-align them), but then it looks better. It needs adjustment for themes.

body:not(.no-svg-replace) svg.left-arrow-with-tail {
    margin-bottom: -0.2em;
}
body:not(.no-svg-replace) svg.right-arrow-with-tail {
    margin-bottom: -0.2em;
}

Update: You can enable the count in the settings, there is no need to add a css file on your own.

from customizable-page-header-buttons.

kometenstaub avatar kometenstaub commented on August 22, 2024

An updated snippet is available here: https://github.com/kometenstaub/customizable-page-header-buttons#css-snippet-for-pane-relief-count

from customizable-page-header-buttons.

kometenstaub avatar kometenstaub commented on August 22, 2024

The count is available in the settings now as an option.

from customizable-page-header-buttons.

ronrdev avatar ronrdev commented on August 22, 2024

Thanks. It's working great.

from customizable-page-header-buttons.

ronrdev avatar ronrdev commented on August 22, 2024

Again thank you.

Adding a bug report for your reference. Not another enhancement request.

Not working as expected:
Must have the cursor in the pane if you want to use left click. Left click targets the active pane. So example if you have three panes open, all the forward buttons will change the active pane.

From pjeby
Yes, that's a limitation of the way the other plugin works, as the buttons are triggering the keyboard commands for navigating forward and back, which apply to the currently-active pane.

from customizable-page-header-buttons.

kometenstaub avatar kometenstaub commented on August 22, 2024

Did he say how that could be fixed?

The only thing I can think of would be a setTimeout in these two cases, so that the click changes the active pane and then executes the command a bit later.

from customizable-page-header-buttons.

ronrdev avatar ronrdev commented on August 22, 2024

No - here is where I posted.
pjeby/pane-relief#3

I added the bug report over there first because I assumed it was because of the way pane relief worked.

from customizable-page-header-buttons.

kometenstaub avatar kometenstaub commented on August 22, 2024

That should work properly now. Please let me know whether 4.1.1 fixes it for you.

from customizable-page-header-buttons.

ronrdev avatar ronrdev commented on August 22, 2024

Success. Works exactly as expected and it's fast. When you mentioned setTimeout I thought it might cause a noticeable delay between button click and response, but the function is smooth. It feels like it's build in.
Thanks for creating this and adding full compatibility with pane relief.

I'm using minimal theme, no problems.
I only tried it on desktop. I don't use mobile, but probably not a lot of multiple panes use on mobile anyway.
Only thing I had to do was copy your css from the plugin install to make a snippet to lower the opacity.

from customizable-page-header-buttons.

kometenstaub avatar kometenstaub commented on August 22, 2024

Pane relief doesn't work on mobile. The CSS therefore also only targets desktop Obsidian.

I tried it with Minimal, the opacity seems to work out of the box unless you wanted it to be fainter than it is normally.

from customizable-page-header-buttons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.