Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fissure notification options #1325

Merged
merged 1 commit into from
Feb 5, 2025
Merged

Conversation

TobiTenno
Copy link
Member

@TobiTenno TobiTenno commented Feb 5, 2025

Summary:

also fix: synth portraits
closes #1295


Fixes issue (include link):


Mockups, screenshots, evidence:

Summary by CodeRabbit

  • New Features
    • Introduced enhanced configuration for tracking rewards and event types.
  • Bug Fixes
    • Updated in-guide resource links to direct users to official pages.
    • Adjusted fissure notifications to clearly indicate difficulty.
  • Refactor
    • Improved sorting and organization in filtering options and fissure listings.
    • Streamlined image source handling for more consistent data flow.
  • Chores
    • Updated external URLs across data files and migrated configuration from legacy to new modules.

@TobiTenno TobiTenno requested a review from a team as a code owner February 5, 2025 04:22
Copy link

vercel bot commented Feb 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
warframe-hub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2025 4:23am

Copy link

coderabbitai bot commented Feb 5, 2025

Walkthrough

This pull request updates several components and static assets. Changes include modifications in computed properties and sorting logic, along with minor syntax adjustments in UI components. Multiple URL references have been updated from the fandom domain to the official wiki domain. Additionally, the notification system now adjusts the notification identifier based on the fissure’s difficulty. A new JavaScript module replaces a deprecated JSON file for trackables data, and the related import in state management is updated accordingly.

Changes

File(s) Change Summary
components/SynthesisImg.jsx Changed property access from this.$props.src to this.src (computed internally).
components/modalDialogs/Filters/{ComponentsFilter.jsx, FissureFilters.jsx, NotificationFilters.jsx} and components/panels/FissuresPanel.vue Revised computed properties: added sorting to arrays, modified class attribute definition, and clarified multi-criteria sorting logic.
pages/{ow/fish/howto/index.vue, synthesis.vue} Updated external links from warframe.fandom.com to wiki.warframe.com; added a new equipment link in the how-to page.
services/Notifier.js Modified generateNotifications to conditionally append “.sp” to the notification identifier based on fissure.isHard.
static/json/fish/{deimos.json, poe.json, vallis.json} Updated all “wiki” URLs to point to the official wiki domain.
static/json/trackables.js and removal of static/json/trackables.json Introduced a new module exporting rewardTypes, eventTypes, and a generated fissures object; removed the legacy JSON file.
store/worldstate.js Updated the import for trackables from the JSON file to the new JavaScript module.

Sequence Diagram(s)

sequenceDiagram
    participant F as Fissure
    participant N as Notifier
    F->>N: Trigger generateNotifications(fissure)
    N->>N: Check if fissure.isHard
    alt fissure.isHard true
       N->>N: Append ".sp" to notifIdentifier
    else
       N->>N: Generate notifIdentifier normally
    end
    N->>N: Create and dispatch notification
Loading

Assessment against linked issues

Objective Addressed Explanation
Add Omnia Fissures to the notifier list and split out subtypes (conjunction survival, void cascade, void flood, alchemy) [#1295] The updated notification identifier logic shows conditional handling but does not explicitly split the subtypes.

Suggested labels

released

Suggested reviewers

  • SlayerOrnstein

Poem

Oh, I’m hopping with delight,
My whiskers twitch in code so bright.
Sorting arrays and links set right,
Every line makes my day light.
A bunny’s cheer for changes tight —
Code carrots for a future so light!
🐇✨

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
components/SynthesisImg.jsx (1)

1-46: Consider using an external configuration file for image mappings.

The static image mappings object is quite large. Consider moving it to a separate configuration file to improve maintainability and reduce the component's complexity.

Create a new file config/synthesis-images.js:

import { optimize, cdn } from '@/services/utilities';

export const synthesisImages = {
  'Ancient Disruptor': optimize(cdn('webp/synthesis/ancient_disruptor.webp')),
  'Ancient Healer': optimize(cdn('webp/synthesis/ancient_healer.webp')),
  // ... rest of the mappings
};

Then import and use it in the component:

 import HubImg from '@/components/HubImg.jsx';
 import { optimize, cdn } from '@/services/utilities';
+import { synthesisImages } from '@/config/synthesis-images';

 const translate = (stub) => (stub ? optimize(cdn(`webp/synthesis/${stub}.webp`)) : null);

-const imgs = {
-  'Ancient Disruptor': optimize(cdn('webp/synthesis/ancient_disruptor.webp')),
-  // ... remove the rest
-};
+const imgs = synthesisImages;
static/json/trackables.js (3)

85-85: Fix typo in Exilus Adapter text.

There's a typo in the text property: "Adapater" should be "Adapter".

-    text: 'Exilus Adapater',
+    text: 'Exilus Adapter',

502-511: Consider adding validation for fissure combinations.

The nested loop generates all possible combinations of tiers and mission types, but some combinations might not be valid in-game. Consider:

  1. Adding validation to filter out invalid combinations
  2. Documenting which combinations are actually possible
 fissures.tiers.forEach((tier) => {
   fissures.missionTypes.forEach((missionType) => {
+    // Skip invalid combinations
+    if (!isValidFissureCombination(tier, missionType)) return;
+
     const key = `fissures.${tier.value}.${missionType.value}`;
     eventTypes[key] = {
       state: false,
       value: key,
       text: `${tier.text} ${missionType.text} Fissure`,
     };
   });
 });

+/**
+ * Validates if a fissure combination is possible in-game
+ * @param {Object} tier - Fissure tier object
+ * @param {Object} missionType - Mission type object
+ * @returns {boolean} - Whether the combination is valid
+ */
+function isValidFissureCombination(tier, missionType) {
+  // Add validation logic here
+  return true;
+}

1-517: Great architectural improvement moving from JSON to JS module!

This change brings several benefits:

  1. Better IDE support and type checking
  2. Dynamic generation of fissure combinations
  3. Ability to add validation logic and documentation
  4. More maintainable and extensible structure
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3fd290a and 7967510.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (14)
  • components/SynthesisImg.jsx (1 hunks)
  • components/modalDialogs/Filters/ComponentsFilter.jsx (1 hunks)
  • components/modalDialogs/Filters/FissureFilters.jsx (1 hunks)
  • components/modalDialogs/Filters/NotificationFilters.jsx (1 hunks)
  • components/panels/FissuresPanel.vue (1 hunks)
  • pages/ow/fish/howto/index.vue (4 hunks)
  • pages/synthesis.vue (1 hunks)
  • services/Notifier.js (1 hunks)
  • static/json/fish/deimos.json (13 hunks)
  • static/json/fish/poe.json (14 hunks)
  • static/json/fish/vallis.json (14 hunks)
  • static/json/trackables.js (1 hunks)
  • static/json/trackables.json (0 hunks)
  • store/worldstate.js (1 hunks)
💤 Files with no reviewable changes (1)
  • static/json/trackables.json
✅ Files skipped from review due to trivial changes (7)
  • pages/synthesis.vue
  • pages/ow/fish/howto/index.vue
  • components/modalDialogs/Filters/FissureFilters.jsx
  • store/worldstate.js
  • static/json/fish/vallis.json
  • static/json/fish/poe.json
  • static/json/fish/deimos.json
🔇 Additional comments (8)
components/SynthesisImg.jsx (2)

65-69: LGTM! Well-structured data computation.

The data function effectively computes the src by attempting to translate the image prop first, then falling back to the static mapping. This provides good flexibility while maintaining a clean interface.


74-74: LGTM! Improved data flow.

The change from this.$props.src to this.src is correct as it properly uses the computed source from the component's data, which handles both dynamic and static image paths.

components/modalDialogs/Filters/ComponentsFilter.jsx (1)

38-39: LGTM! Enhanced component sorting.

The addition of alphabetical sorting by text property improves the user experience by making components easier to locate.

components/modalDialogs/Filters/NotificationFilters.jsx (1)

56-57: LGTM! Consistent sorting implementation.

The addition of sorting by value property aligns with the sorting in ComponentsFilter, providing a consistent user experience across filters.

components/panels/FissuresPanel.vue (1)

151-155: LGTM! Improved fissure sorting logic.

The sorting logic has been made more explicit and maintainable by:

  1. Clear primary sort by tier number
  2. Secondary sort handling storm fissures
  3. Better readability with separate conditions
services/Notifier.js (1)

316-316: LGTM! Enhanced fissure notification identification.

The notification identifier now properly distinguishes between regular and steel path fissures by appending '.sp' suffix, improving notification categorization and aligning with the PR objective to fix fissure notification options.

static/json/trackables.js (2)

98-369: LGTM! Well-structured event types.

The event types are well-organized with consistent properties and clear naming patterns, particularly for arbitration events.


513-516: LGTM! Clean export structure.

The default export cleanly combines both objects, making them easily importable elsewhere.

@TobiTenno TobiTenno merged commit a1fbadc into dev Feb 5, 2025
8 checks passed
@TobiTenno TobiTenno deleted the fissure-notifs-synth-imgs branch February 5, 2025 04:38
wfcd-bot-boi pushed a commit that referenced this pull request Feb 5, 2025
## [2.5.3](v2.5.2...v2.5.3) (2025-02-05)

### Bug Fixes

* fissure notification options ([#1325](#1325)) ([a1fbadc](a1fbadc))
@wfcd-bot-boi
Copy link
Collaborator

🎉 This PR is included in version 2.5.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Omnia Fissures
3 participants