simple-module-feature-flags 0.0.33__tar.gz → 0.0.35__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.35}/PKG-INFO +4 -4
  2. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/endpoints/views.py +1 -1
  3. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/pages/Browse.tsx +1 -1
  4. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/pages/components/ScopeCard.tsx +13 -12
  5. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/package.json +3 -3
  6. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/pyproject.toml +4 -4
  7. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/.gitignore +0 -0
  8. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/LICENSE +0 -0
  9. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/README.md +0 -0
  10. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/__init__.py +0 -0
  11. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/constants.py +0 -0
  12. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/contracts/__init__.py +0 -0
  13. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/contracts/schemas.py +0 -0
  14. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/deps.py +0 -0
  15. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/endpoints/__init__.py +0 -0
  16. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/endpoints/api.py +0 -0
  17. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/locales/en.json +0 -0
  18. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/models.py +0 -0
  19. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/module.py +0 -0
  20. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/pages/components/FlagTable.tsx +0 -0
  21. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/pages/components/TenantPicker.tsx +0 -0
  22. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/pages/components/ToggleConfirmDialog.tsx +0 -0
  23. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/pages/types.ts +0 -0
  24. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/py.typed +0 -0
  25. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/feature_flags/service.py +0 -0
  26. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/tests/test_feature_flags_api.py +0 -0
  27. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/tests/test_feature_flags_audit_links.py +0 -0
  28. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/tests/test_feature_flags_menu_section.py +0 -0
  29. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/tests/test_feature_flags_service.py +0 -0
  30. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/tests/test_store_outage_fallback.py +0 -0
  31. {simple_module_feature_flags-0.0.33 → simple_module_feature_flags-0.0.35}/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.35
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.35
25
+ Requires-Dist: simple-module-db==0.0.35
26
+ Requires-Dist: simple-module-hosting==0.0.35
27
27
  Description-Content-Type: text/markdown
28
28
 
29
29
  # simple_module_feature_flags
@@ -9,9 +9,9 @@ frontend doesn't need separate routes per scope.
9
9
  from __future__ import annotations
10
10
 
11
11
  from fastapi import APIRouter, Depends, Request
12
- from inertia import InertiaResponse
13
12
  from simple_module_hosting.inertia_deps import InertiaDep
14
13
  from simple_module_hosting.permissions import RequiresPermission
14
+ from simple_module_inertia import InertiaResponse
15
15
  from starlette.responses import RedirectResponse
16
16
 
17
17
  from feature_flags.constants import (
@@ -107,5 +107,5 @@ function Browse() {
107
107
  );
108
108
  }
109
109
 
110
- Browse.layout = (page: React.ReactNode) => <AdminLayout>{page}</AdminLayout>;
110
+ Browse.layout = [AdminLayout];
111
111
  export default Browse;
@@ -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
@@ -6,14 +6,14 @@
6
6
  "peerDependencies": {
7
7
  "react": "^19.0.0",
8
8
  "react-dom": "^19.0.0",
9
- "@inertiajs/react": "^2.0.0",
9
+ "@inertiajs/react": "^3.7.0",
10
10
  "@simple-module-py/ui": "*"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@simple-module-py/tsconfig": "*"
14
14
  },
15
15
  "dependencies": {
16
- "lucide-react": "^1.28.0",
17
- "sonner": "^2.0.7"
16
+ "lucide-react": "^1.43.0",
17
+ "sonner": "^2.0.8"
18
18
  }
19
19
  }
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "simple_module_feature_flags"
3
- version = "0.0.33"
3
+ version = "0.0.35"
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.35",
25
+ "simple_module_db==0.0.35",
26
+ "simple_module_hosting==0.0.35",
27
27
  ]
28
28
 
29
29
  [project.entry-points.simple_module]