From 408a27119a549bba8e4e27f60f13354cf074359f Mon Sep 17 00:00:00 2001 From: justin melvin Date: Tue, 5 Jan 2021 21:18:17 -0800 Subject: [PATCH] Put -SOLVED as a suffix on sheet names and not a prefix to preserve alphabetical ordering. --- TODO | 6 ------ turbot/interaction.py | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/TODO b/TODO index bf232bd..34481a6 100644 --- a/TODO +++ b/TODO @@ -81,12 +81,6 @@ Sheet-related fixes have backup access to all of them on the off chance of Slack not being available.) -• Question: Having "SOLVED" at the beginning of the sheet name is nice - for makint it noticeable with the sheet open, but it changes the - order of the sheet in the folder view. Do we maybe want to put - "SOLVED" at the end of the name so that puzzle sheets can be - reliably found in an ordered position regardless of solved status? - • Come up with a better sheet template • Put the puzzle's name into the primary tab of the sheet diff --git a/turbot/interaction.py b/turbot/interaction.py index e6f7503..b50a658 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -598,9 +598,9 @@ def solved(turb, body, args): # And update the puzzle's description set_channel_topic(turb, puzzle) - # And rename the sheet to prefix with "SOLVED: " + # And rename the sheet to suffix with "-SOLVED" turbot.sheets.renameSheet(turb, puzzle['sheet_url'], - 'SOLVED: ' + puzzle['name']) + puzzle['name'] + "-SOLVED") # Finally, rename the Slack channel to add the suffix '-solved' channel_name = "{}-{}-solved".format( -- 2.43.0