Skip to content

Commit 830ae58

Browse files
Proxy object link clickable profile (#131)
* use clickable_profile instead of disable * Default to True for clickable profile * changelog * upgrade step * fix the upgrade steps * fix * fix lint * fix test * Add documentation news fragment for docs changes Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix * fix toast i size * changelog --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7ef4155 commit 830ae58

12 files changed

Lines changed: 62 additions & 11 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use "clickable_profile_link' instead of 'disable_profile_link' @Tishasoumya-02

backend/src/kitconcept/core/controlpanel/kitconcept.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ class IKitconceptSettings(Interface):
2121
required=False,
2222
)
2323

24-
disable_profile_links = schema.Bool(
25-
title=_("Non-clickable Profiles"),
24+
clickable_profile_links = schema.Bool(
25+
title=_("Clickable profiles"),
2626
description=_(
27-
"Person profiles are not clickable in teasers, grids, listings, and search"
27+
"Person profiles are clickable in teasers, grids, listings, and search"
2828
),
2929
required=False,
30-
default=False,
30+
default=True,
3131
)
3232

3333

@@ -68,4 +68,4 @@ def __call__(self, data):
6868
IKitconceptSettings, prefix="kitconcept.core.settings"
6969
)
7070
data["kitconcept.custom_css"] = settings.custom_css
71-
data["kitconcept.disable_profile_links"] = settings.disable_profile_links
71+
data["kitconcept.clickable_profile_links"] = settings.clickable_profile_links
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<metadata>
3-
<version>20260701001</version>
3+
<version>20260706001</version>
44
</metadata>

backend/src/kitconcept/core/upgrades/configure.zcml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<include package=".v20260619001" />
1616
<include package=".v20260620001" />
1717
<include package=".v20260701001" />
18+
<include package=".v20260706001" />
1819

1920
</configure>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from plone.registry.interfaces import IRegistry
2+
from Products.GenericSetup.tool import SetupTool
3+
from zope.component import getUtility
4+
5+
6+
def rename_disable_to_clickable_profile_links(tool: SetupTool):
7+
"""Migrate disable_profile_links to clickable_profile_links.
8+
9+
The old ``disable_profile_links`` flag was inverted and renamed to
10+
``clickable_profile_links``, so carry the previous value over with the
11+
opposite meaning and drop the stale record.
12+
"""
13+
old_key = "kitconcept.core.settings.disable_profile_links"
14+
new_key = "kitconcept.core.settings.clickable_profile_links"
15+
registry = getUtility(IRegistry)
16+
records = registry.records
17+
if old_key in records:
18+
disabled = registry[old_key]
19+
registry[new_key] = not disabled
20+
del records[old_key]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<configure
2+
xmlns="http://namespaces.zope.org/zope"
3+
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
4+
>
5+
6+
<genericsetup:upgradeSteps
7+
profile="kitconcept.core:base"
8+
source="20260701001"
9+
destination="20260706001"
10+
>
11+
<genericsetup:upgradeDepends
12+
title="Add clickable_profile_links to kitconcept registry"
13+
import_profile="kitconcept.core:dependencies"
14+
import_steps="plone.app.registry"
15+
/>
16+
<genericsetup:upgradeStep
17+
title="Rename disable_profile_links to clickable_profile_links"
18+
handler=".rename_disable_to_clickable_profile_links"
19+
/>
20+
</genericsetup:upgradeSteps>
21+
22+
</configure>

backend/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def current_versions() -> CurrentVersions:
7070
from kitconcept.core import __version__
7171

7272
return CurrentVersions(
73-
base="20260701001",
73+
base="20260706001",
7474
dependencies="1000",
7575
package=__version__,
7676
)

docs/docs/concepts/what-is-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ After bumping the version of `kitconcept.core:base`, we need to create a new upg
110110
handler="..utils.null_upgrade_step"
111111
/>
112112
<genericsetup:upgradeDepends
113-
title="Adds disable_profile_links setting to kitconcept settings"
113+
title="Adds clickable_profile_links setting to kitconcept settings"
114114
import_profile="kitconcept.core:dependencies"
115115
import_steps="plone.app.registry"
116116
/>

docs/docs/how-to-guides/upgrade-plone.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Make a quick search for `plone_version` in the `backend/tests` folder and update
4949
/>
5050
<!-- Additional step updating registry settings defined in kitconcept.core:dependencies -->
5151
<genericsetup:upgradeDepends
52-
title="Adds disable_profile_links setting to kitconcept settings"
52+
title="Adds clickable_profile_links setting to kitconcept settings"
5353
import_profile="kitconcept.core:dependencies"
5454
import_steps="plone.app.registry"
5555
/>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix the size of i icon in toast @Tishasoumya-02

0 commit comments

Comments
 (0)