Skip to content

Conversation

@jevenski
Copy link
Contributor

@jevenski jevenski commented Dec 10, 2024

  • Adjust s-table's createRow() method to use jQuery to create table rows. This is more readable than generating table rows
    with HTML strings.
  • Rewrite toggleColumn to use jQuery's toggle() method to toggle table cell display and use jQuery's selector function to replace a for loop.
  • Deprecate calcSize() method with a deprecation warning since we're unifying behaviors on different browsers. This method will be removed in the next major version update.

background-color: var(--container-bg-color);
}

.stable-icon {background-image: url(../images/tstatus.png); background-repeat: no-repeat}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to stable.css

).join('');
if(!browser.isIE7x)
{
row.find("td:first-child div").prepend(this.createIcon(icon));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Append an icon to the first cell in a row directly, without having to check for the cell index on every cell.

: $('<span>').addClass(['stable-icon', icon]))[0].outerHTML;
dxSTable.prototype.createIconHTML = function(icon) {
// TODO: deprecated, remove this method in v6
noty("Deprecation warning: `dxSTable.createIconHTML()` is deprecated. Please use `dxSTable.createIcon()` instead.");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a deprecation warning to prevent sudden API breakage.

td: [
`<td class="stable-${this.dCont.id}-col-${ind}"`,
Boolean(cdat.enabled || browser.isIE7x) ? '>' : ' style="display: none">',
ind === 0 ? this.createIconHTML(icon) : ''
Copy link
Contributor Author

@jevenski jevenski Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conditional runs on every cell. If there are 25 cells in a row, and 1,000 rows in a table, there will be 24 * 1,000 = 24,000 unnecessary checks.

background-image: url(./images/tb_search.svg);
background-image: url(./images/tb_rss.svg);
background-image: url(./images/rb_rss_group.svg);
background-image: url(./images/tb_rss_group.svg);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo fix.

background-image: url(./images/pnl_close.svg);
background-image: url(./images/file.svg);
background-image: url(./images/dir.svg);
background-image: url(./images/dir.svg);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dedupe.

@jevenski jevenski force-pushed the create-row branch 2 times, most recently from 32b6354 to 89e4249 Compare December 10, 2024 02:20
background-image: url(./images/plugin.svg);
background-image: url(./images/yellow.svg);
background-image: url(./images/red.svg);
background-image: url(./images/green.svg);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dedupe.

@stickz
Copy link
Collaborator

stickz commented Dec 12, 2024

The text is too close to the icon for the torrent name. Please increase spacing to match v5.1.

@stickz
Copy link
Collaborator

stickz commented Dec 16, 2024

@jevenski I rebased this for you. Great job with the performance improvements.

However, when I resize a column the header and body goes out of sync. This critical issue needs fixed before I can merge.

- Adjust s-table's `createRow()` method to use jQuery to create
  table rows. This is more readable than generating table rows
  with HTML strings.
- Rewrite `toggleColumn` to use jQuery's `toggle()` method to toggle
  table cell display and use jQuery's selector function to replace
  a for loop.
- Deprecate `calcSize()` method with a deprecation warning since we're
  unifying behaviors on different browsers. This method will be removed
  in the next major version update.
@jevenski jevenski changed the title Create s-table rows using jQuery DOM manipulation Change various s-table methods Dec 16, 2024
@jevenski
Copy link
Contributor Author

@stickz I did some modification to this patch and force pushed again. Previous changes are all squashed into one commit. Additionally, an old s-table method (.calcSize()) is removed and marked for deprecation to unify APP behaviors on different browsers and sync cell width between s-table header and body.

@stickz
Copy link
Collaborator

stickz commented Dec 16, 2024

All fixed, great job!

@stickz stickz merged commit 5061f71 into Novik:develop Dec 16, 2024
@jevenski jevenski deleted the create-row branch December 16, 2024 05:45
stickz added a commit to stickz/docker-rtorrent-rutorrent that referenced this pull request Apr 27, 2025
**Full Changelog**: Novik/ruTorrent@v5.1.7...v5.2.1

# ruTorrent v5.2.1
This is a critical hotfix to resolve breakage of RSS feeds. It's highly recommended to upgrade.
In addition, the white border is fixed on dark themes. A stopped state is also added to torrents.

## What's Changed
* Adding Stopped state by ranirahn in Novik/ruTorrent#2893
* Fix for broken RSS feeds break the rutorrent. by ranirahn in Novik/ruTorrent#2894
* Fix white border in dark themes by drrako in Novik/ruTorrent#2898

**Full Changelog**: Novik/ruTorrent@v5.2.0...v5.2.1

# ruTorrent v5.2.0 is now Stable
This is a release contains more mobile design improvements, performance improvements and various new features. It builds on progress made in ruTorrent `v5.1` toward mobile development. 

## Critical Improvement Summary

1. Torrents now have bigger font to make them easier to read.
2. There is no more drag mask when moving around dialog boxes.
3. Internet explorer is no longer supported. (Yes finally, we dropped it)
4. Various performance improvements to tables to improve responsiveness.
5. The clear log now has a bootstrap button in the bottom right corner.
6. Many other smaller improvements, bug fixes and new features.

## What's Changed
* Fix torrent deleted without confirmation by koblack in Novik/ruTorrent#2804
* filedrop plugin: support dropped links by pekman in Novik/ruTorrent#2806
* Remove drag mask object by jevenski in Novik/ruTorrent#2805
* Covert clear log to a floating button by jevenski in Novik/ruTorrent#2810
* Use bootstrap dropdown on recent trackers by jevenski in Novik/ruTorrent#2809
* Use flex layout on context menu items by jevenski in Novik/ruTorrent#2812
* Adjust status bar and top menu by jevenski in Novik/ruTorrent#2813
* Define dialog window colors using variables by jevenski in Novik/ruTorrent#2815
* Distribute WebUi space using flex layout by jevenski in Novik/ruTorrent#2826
* Remove Internet Explorer support, and some useragent sniffing hacks by anthonyryan1 in Novik/ruTorrent#2825
* Change various s-table methods by jevenski in Novik/ruTorrent#2821
* Define status bar icons using base64 strings by jevenski in Novik/ruTorrent#2833
* Animate category panel by jevenski in Novik/ruTorrent#2831
* Define getter functions on s-table by jevenski in Novik/ruTorrent#2830
* Use bootstrap list group on options window by jevenski in Novik/ruTorrent#2819
* Define s-table header styles using variables by jevenski in Novik/ruTorrent#2836
* Improve s-table column resizing by jevenski in Novik/ruTorrent#2837
* Control alternate row color using CSS by jevenski in Novik/ruTorrent#2841
* Improve move column function by jevenski in Novik/ruTorrent#2844
* Improve s-table header row hover event handler by jevenski in Novik/ruTorrent#2851
* Drag and drop s-table header using DnD class by jevenski in Novik/ruTorrent#2855
* Merge stable head and body into one table by jevenski in Novik/ruTorrent#2860
* Add danger color to #randomize_hash by anthonyryan1 in Novik/ruTorrent#2875
* Fix various bugs for v5.2 by jevenski in Novik/ruTorrent#2863
* Let rutracker_check ignore torrents with certain labels by drrako in Novik/ruTorrent#2866
* Add "::1" to localhost address list. by rozhuk-im in Novik/ruTorrent#2881
* Improve $tempDirectory handling: by rozhuk-im in Novik/ruTorrent#2880
* Diskspace option to display free bytes (new pull request against develop branch) by TheGoblinHero in Novik/ruTorrent#2890
* Add a permission to hide all torrent options by fffe in Novik/ruTorrent#2868
* Mark ruTorrent v5.2 as Stable by stickz in Novik/ruTorrent#2891

## New Contributors
* pekman made their first contribution in Novik/ruTorrent#2806
* rozhuk-im made their first contribution in Novik/ruTorrent#2881

**Full Changelog**: Novik/ruTorrent@v5.1.7...v5.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants