GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — When deleting a user, that user should not appear in the re-assign articles drop-down · Issue #1820 · textpattern/textpattern

When deleting a user, that user should not appear in the re-assign articles drop-down #1820

New issue
Copy link
New issue
Copy link
Open
Open
When deleting a user, that user should not appear in the re-assign articles drop-down#1820
Copy link
Labels
usability / UI / UX
Milestone
v5.0

Description

@jools-r
jools-r
opened on Aug 10, 2022
Issue body actions

Expected behaviour

On the Admin › Users panel, when deleting a user with articles, you are asked to reassign those articles to another user. I expect to see only other users in the "Select author drop-down".

Actual behaviour

As above but you still the user you are about to delete in the user drop-down.

If you go through and choose "Go", the error is thankfully trapped and you get the error “You cannot assign assets to a deleted account”. As such the "bug report" is only a cosmetic problem. See screenshot below.

Steps to reproduce

  • Set up txp
  • Add a new user
  • Duplicate the start article, set to live and assign to the new user name
  • Visit Admin › Users, place a checkmark in the box next to the new user, and choose "Delete" from the multi-action choice menu at the bottom. The “re-assign to another user” dropdown still includes the user that is about to be deleted.

Additional information

Textpattern version: 4.8.8

Web server vendor and version: Apache + nginx

Database server vendor and version: 8.0.30

PHP version: 8.1.9

Operating system: Linux / Darwin

image

Thanks to @uli-on for spotting it and reporting it.

Reacted by uli-on

Activity

  1. Bloke commented on Aug 10, 2022

    @Bloke
    Bloke
    on Aug 10, 2022
    Member
    More actions

    This is one of those tricky ones. When the page is built, the drop-down is built with it containing all known users. There's no knowlege of which checkboxes you'll select, what search terms you'll use to filter the list, yahde yahde.

    So when you click one or more users we'd have to go through the drop-down and remove them. Then if you uncheck the user, we'd have to go and put that one back in the list. With thousands of users, that's probably going to slow things down considerably - and I've seen sites with that many users. It's bad enough waiting for it to populate the page in the first place and find the user you want to reassign from the huuuuge list in the drop-down, let alone waiting for the interface to dynamically alter the drop-down entries.

    I've never thought of a decent way to handle this. Maybe @bloatware has some ideas?

  2. jools-r commented on Aug 10, 2022

    @jools-r
    jools-r
    on Aug 10, 2022
    SponsorMemberAuthor
    More actions

    That's a pretty convincing explanation. I guess 95 is probably the most users you'll be able to select at once if you extend pagination to 96 so maybe that limits it a little bit, but I get what you say.

    A really wild guess without having thought it through: might one be able to leverage css here? Something like when a checkbox is set/unset for a user, a corresponding class is set/unset that controls the hide/show display of the item in the drop-down. The dropdown wouldn't need rebuilding dynamically, it would just be classList.add / .remove. That would get most computationally expensive when choosing the tick box for "all users" – which is a possible but probably also relatively rare occurrence.

  3. bloatware commented on Aug 10, 2022

    @bloatware
    bloatware
    on Aug 10, 2022
    Member
    More actions

    Altering a drop-down list via JS should be fast enough, but we'd better do it properly, e.g. not on users (un)check but on selecting 'Delete' option. And since some other actions/tabs (like reassigning the parent category) would benefit from this feature too, we'd need to enhance the multi-edit widget with some general mechanism.

  4. Bloke commented on Aug 10, 2022

    @Bloke
    Bloke
    on Aug 10, 2022
    Member
    More actions

    If we can build some cool generic behaviour into the multi-edit tool to handle situations where we want to post-modify the content that'd be ace.

  5. petecooper
    added
    usability / UI / UX
    on Aug 24, 2022
  6. petecooper
    added this to the v4.10 milestone on Jan 19, 2023
  7. petecooper
    modified the milestones: v4.10, v5.0 on Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    usability / UI / UX

    Type

    No type

    Projects

    No projects

      Milestone

      • v5.0No due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.