simple-module-feature-flags 0.0.33__tar.gz → 0.0.34__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/PKG-INFO +4 -4
  2. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/pages/components/ScopeCard.tsx +13 -12
  3. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/pyproject.toml +4 -4
  4. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/.gitignore +0 -0
  5. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/LICENSE +0 -0
  6. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/README.md +0 -0
  7. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/__init__.py +0 -0
  8. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/constants.py +0 -0
  9. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/contracts/__init__.py +0 -0
  10. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/contracts/schemas.py +0 -0
  11. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/deps.py +0 -0
  12. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/endpoints/__init__.py +0 -0
  13. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/endpoints/api.py +0 -0
  14. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/endpoints/views.py +0 -0
  15. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/locales/en.json +0 -0
  16. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/models.py +0 -0
  17. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/module.py +0 -0
  18. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/pages/Browse.tsx +0 -0
  19. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/pages/components/FlagTable.tsx +0 -0
  20. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/pages/components/TenantPicker.tsx +0 -0
  21. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/pages/components/ToggleConfirmDialog.tsx +0 -0
  22. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/pages/types.ts +0 -0
  23. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/py.typed +0 -0
  24. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/feature_flags/service.py +0 -0
  25. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/package.json +0 -0
  26. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/tests/test_feature_flags_api.py +0 -0
  27. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/tests/test_feature_flags_audit_links.py +0 -0
  28. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/tests/test_feature_flags_menu_section.py +0 -0
  29. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/tests/test_feature_flags_service.py +0 -0
  30. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/tests/test_store_outage_fallback.py +0 -0
  31. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.34}/tsconfig.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: simple_module_feature_flags
3
- Version: 0.0.33
3
+ Version: 0.0.34
4
4
  Summary: Simple feature-flag module with per-tenant overrides and a consumer API for simple_module
5
5
  Project-URL: Homepage, https://github.com/antosubash/simple_module_python
6
6
  Project-URL: Repository, https://github.com/antosubash/simple_module_python
@@ -21,9 +21,9 @@ Classifier: Topic :: Internet :: WWW/HTTP
21
21
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
22
22
  Classifier: Typing :: Typed
23
23
  Requires-Python: >=3.12
24
- Requires-Dist: simple-module-core==0.0.33
25
- Requires-Dist: simple-module-db==0.0.33
26
- Requires-Dist: simple-module-hosting==0.0.33
24
+ Requires-Dist: simple-module-core==0.0.34
25
+ Requires-Dist: simple-module-db==0.0.34
26
+ Requires-Dist: simple-module-hosting==0.0.34
27
27
  Description-Content-Type: text/markdown
28
28
 
29
29
  # simple_module_feature_flags
@@ -1,5 +1,6 @@
1
1
  import { Link } from '@inertiajs/react';
2
2
  import { keys, useT } from '@simple-module-py/i18n';
3
+ import { InterpolatedText } from '@simple-module-py/ui/components/InterpolatedText';
3
4
  import { Card } from '@simple-module-py/ui/components/ui/card';
4
5
  import { TenantPicker } from './TenantPicker';
5
6
 
@@ -11,21 +12,12 @@ interface Props {
11
12
  onSelect: (tenantId: string | null) => void;
12
13
  }
13
14
 
14
- // Word Joiner: a zero-width character that cannot appear in real copy, used to
15
- // find where the translator put the tenant id so it can be rendered in the mono
16
- // face. Interpolating twice and splitting keeps word order the translator's
17
- // choice, which pinning the id to the end of the sentence would not.
18
- const SLOT = '\u2060';
19
-
20
15
  /**
21
16
  * The scope row above the table: which tenant is being looked at, what that
22
17
  * means for unset flags, and a way into the history of every change.
23
18
  */
24
19
  export function ScopeCard({ tenantId, tenants, auditLogUrl, onSelect }: Props) {
25
20
  const { t } = useT();
26
- const [hintBefore, hintAfter] = tenantId
27
- ? t(keys.feature_flags.browse.viewing_tenant, { tenant_id: SLOT }).split(SLOT)
28
- : [t(keys.feature_flags.browse.viewing_system), ''];
29
21
 
30
22
  return (
31
23
  <Card className="mb-4 flex flex-row flex-wrap items-center gap-x-3 gap-y-2 p-4">
@@ -34,9 +26,18 @@ export function ScopeCard({ tenantId, tenants, auditLogUrl, onSelect }: Props) {
34
26
  </span>
35
27
  <TenantPicker tenantId={tenantId} tenants={tenants} onSelect={onSelect} />
36
28
  <p className="text-sm text-muted-foreground">
37
- {hintBefore}
38
- {tenantId && <code className="font-mono text-xs">{tenantId}</code>}
39
- {hintAfter}
29
+ {tenantId ? (
30
+ // One key, one ordinary `{tenant_id}` placeholder: the translator
31
+ // decides where in the sentence the id goes, and it still renders in
32
+ // the mono face wherever they put it.
33
+ <InterpolatedText
34
+ render={(slot) => t(keys.feature_flags.browse.viewing_tenant, { tenant_id: slot })}
35
+ >
36
+ <code className="font-mono text-xs">{tenantId}</code>
37
+ </InterpolatedText>
38
+ ) : (
39
+ t(keys.feature_flags.browse.viewing_system)
40
+ )}
40
41
  </p>
41
42
  {auditLogUrl && (
42
43
  <Link
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "simple_module_feature_flags"
3
- version = "0.0.33"
3
+ version = "0.0.34"
4
4
  description = "Simple feature-flag module with per-tenant overrides and a consumer API for simple_module"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -21,9 +21,9 @@ classifiers = [
21
21
  "Typing :: Typed",
22
22
  ]
23
23
  dependencies = [
24
- "simple_module_core==0.0.33",
25
- "simple_module_db==0.0.33",
26
- "simple_module_hosting==0.0.33",
24
+ "simple_module_core==0.0.34",
25
+ "simple_module_db==0.0.34",
26
+ "simple_module_hosting==0.0.34",
27
27
  ]
28
28
 
29
29
  [project.entry-points.simple_module]