brrd/electron-tabs

right sliding bar

hz2018tv opened this issue · 7 comments

a right sliding bar is added by using tabs. please see attached pics.
screen-no-tab
screen-tab

brrd commented

I can't reproduce. Please give some sample code.

cs1.zip
this will also show #169. thx!

brrd commented

I can't run your code, so I pasted parts of it in electron-tabs demo.

demo/electron-tabs.html:

<!DOCTYPE html>
<html>

<head>
  <title>electron-tabs-demo</title>
</head>
<body style="margin:0">

<tab-group new-tab-button="true" sortable="true">
  <style>
    /* Add custom styles */
    .my-badge {
      background-color: #327BB1;
    }
    .my-custom-tab {
      color: #d135d1;
      font-style: italic;
      font-weight: bold;
    }
  </style>
</tab-group>

<script src="../dist/electron-tabs.js"></script>
<script>
const tabGroup = document.querySelector("tab-group");

let tabInfo = tabGroup.addTab({
    title: "About",
    src: "./info.html",
    webviewAttributes: {
      'webPreferences': 'nodeIntegration=true, contextIsolation=false',
    },
    ready: function(tab) {
      tab.element.classList.add("my-custom-tab");
    },
    visible: true,
    active: true
});
</script>
</body>
</html>

And I copied your info.html in demo/ folder.

As a result everything seems to work as expected (OS info is not printed since I kept nodeIntegration disabled):

image

I don't understand everything in your code, so I can't tell what happens exactly. But obviously this issue is not related with electron-tabs. I advise you to learn javascript and electron first, and to ask your questions to the electron community if needed. I'm sorry to say that I don't have enough time to do this kind of support here.

what about #169? it shows up in your demo above too. Understand it may get complicated when things are put together.

brrd commented

#169 is the same. I can't replicate this issue neither. I believe it comes from your code, which is over complicated in my opinion. Providing support for electron and javascript is out of the scope of our project.

please look at the screenshot of the demo you posted yesterday above, #169 is there. the shaded area does not stop right after the last tab.

brrd commented

I can't see it. I don't understand, sorry.